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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -