c++ - LNK2019 unresolved ext symbol error (Project files included) -


i started learning c(watched first 30 vidoes of "buckys c++ programming tutorials " on youtube),after thought knew little basics went right tutorials on making d3d hacks(fleeps if know it) , on.

so have source i'm trying write , works fine can't figure out why i'm getting "lnk2019 unresolved external symbol error"

i'm pretty sure error main.cpp not being able read things i'm telling to. (i know googling , forum searching while.)

"error 3 error lnk2019: unresolved external symbol "bool __cdecl comparecolour(struct tagrgbquad *,int,int,int,int)" (?comparecolour@@ya_npautagrgbquad@@hhhh@z) referenced in function "void __cdecl scanbmp(class scancontents *)" (?scanbmp@@yaxpavscancontents@@@z) c:\users\sherm\desktop\current project\color aimbot\color aimbot\main.obj color aimbot "

that error. have checked include/lib's multiple times , main.cpp included in project.

also:here project files: http://www.mediafire.com/?3gy76bqvf687h4i

(yes copy paste source have , fix problem whats point in learning)

in main.cpp file have forward decleration comparecolour function, never implemented. have there in main.cpp tells compiler "i promise i'll tell how later, assume exists" creates "external symbol" function. "break promise" , never tell how comparecolour, gets linking error because can't link external symbol code.

so take @ takescreenshot function. on line 5 there forward deceleration it. on line 42 starts implementation it. when takescreenshot called on line 91 compiler creates "external symbol" using information line 5 points empty spot of code. when finishes, goes , sees implementation of function on line 42 , places @ destination of external symbol. when linker goes through file links 2 spots of code , happy. call comparecolor still points empty code when linker encounters it, since there no implementation, , hence error.

that oversimplified version of what's going on, makes sense.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -