Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › cant figure out this error...c++ OpenGL
New Posts  All Forums:Forum Nav:

cant figure out this error...c++ OpenGL

post #1 of 3
Thread Starter 
im remaking tetris for a class and i cant figure out this error im getting

i had to upload all the files as .txt because i couldnt upload .cpp or .h files so to try and compile delete all the CPP or HEADER in the file names and re save them as .cpp or .h files

ill post all the files i have
here is the error im getting
Code:
1>------ Rebuild All started: Project: New Game, Configuration: Debug Win32 ------
1>Build started 11/15/2013 9:40:30 AM.
1>_PrepareForClean:
1>  Deleting file "Debug\New Game.lastbuildstate".
1>InitializeBuildStatus:
1>  Touching "Debug\New Game.unsuccessfulbuild".
1>ClCompile:
1>  letters.cpp
1>  blocks.cpp
1>  background.cpp
1>  Generating Code...
1>  tetris.cpp
1>letters.obj : error LNK2019: unresolved external symbol "public: __thiscall letters::letters(void)" (??0letters@@QAE@XZ) referenced in function "public: void __thiscall letters::drawLetter(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,int,int,int)" (?drawLetter@letters@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHH@Z)
1>tetris.obj : error LNK2019: unresolved external symbol "public: __thiscall background::background(void)" (??0background@@QAE@XZ) referenced in function "void __cdecl gui(void)" (?gui@@YAXXZ)
1>U:\Final Project\New Game\Debug\New Game.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:05.33
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


backgroundCPP.txt 4k .txt file
backgroundHEADER.txt 1k .txt file
blocksCPP.txt 3k .txt file
blocksHEADER.txt 1k .txt file
lettersCPP.txt 15k .txt file
lettersHeader.txt 3k .txt file
tetris.txt 0k .txt file
tetrisCPP.txt 1k .txt file
The Prodigy
(15 items)
 
 
Dream Rig Contest
(11 items)
 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 255 [Gigabyte] GA-78LMT-SP2 [Onboard] ATI Radeon 3000 [Crucial] Ballistix 8GB (2x4GB) 
Hard DriveHard DriveHard DriveOptical Drive
[Western Digital] Blue 320GB [Maxtor] 320GB soon to be adding 4TB from WD Red [Lite-On] DVD Player/Burner 
CoolingOS
[Stock] [Mircrosoft] Windows 7/ Home server 2011 
  hide details  
Reply
The Prodigy
(15 items)
 
 
Dream Rig Contest
(11 items)
 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 255 [Gigabyte] GA-78LMT-SP2 [Onboard] ATI Radeon 3000 [Crucial] Ballistix 8GB (2x4GB) 
Hard DriveHard DriveHard DriveOptical Drive
[Western Digital] Blue 320GB [Maxtor] 320GB soon to be adding 4TB from WD Red [Lite-On] DVD Player/Burner 
CoolingOS
[Stock] [Mircrosoft] Windows 7/ Home server 2011 
  hide details  
Reply
post #2 of 3
You don't have letters() and backgrounds() declared anywhere. They don't exist because of that. That's the error message.

Do that empty { ; } for those two like you did for block::block(). Also, about that block::block(), you should probably not do things like that in the header file. You should write that in the .cpp file.

That's mostly just a guess... I only know very little about C++.
Edited by deepor - 11/15/13 at 10:01am
post #3 of 3
Thread Starter 
omg wow....why didnt i see that lol...thank you so much
The Prodigy
(15 items)
 
 
Dream Rig Contest
(11 items)
 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 255 [Gigabyte] GA-78LMT-SP2 [Onboard] ATI Radeon 3000 [Crucial] Ballistix 8GB (2x4GB) 
Hard DriveHard DriveHard DriveOptical Drive
[Western Digital] Blue 320GB [Maxtor] 320GB soon to be adding 4TB from WD Red [Lite-On] DVD Player/Burner 
CoolingOS
[Stock] [Mircrosoft] Windows 7/ Home server 2011 
  hide details  
Reply
The Prodigy
(15 items)
 
 
Dream Rig Contest
(11 items)
 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 255 [Gigabyte] GA-78LMT-SP2 [Onboard] ATI Radeon 3000 [Crucial] Ballistix 8GB (2x4GB) 
Hard DriveHard DriveHard DriveOptical Drive
[Western Digital] Blue 320GB [Maxtor] 320GB soon to be adding 4TB from WD Red [Lite-On] DVD Player/Burner 
CoolingOS
[Stock] [Mircrosoft] Windows 7/ Home server 2011 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › cant figure out this error...c++ OpenGL