Click to See Complete Forum and Search --> : Unresolved token error with the winapi


blahblahblah5038
July 2nd, 2007, 01:59 PM
I am writing a program that is still in its very early stages, and I have already encountered some errors where I wouldn't have expected them.

One of the main things that the program needs to be able to do is recognize pixel colors from the screen. So the first thing i did was to find someone else's function that searches the screen, and modify it using my limited knowledge.

The function as written was part of a dll file that did compile and worked correctly. The problem came in when I tried to place it into my program. I get 24 unresolved token errors when I attempt to compile. Can anyone please help me?

S_M_A
July 2nd, 2007, 02:58 PM
You shouldn't have implementation in your headers, here's a proper Studio2005 project.

blahblahblah5038
July 2nd, 2007, 03:21 PM
Thank you.

blahblahblah5038
July 2nd, 2007, 04:44 PM
Is there a way to implement that function in a separate file?

S_M_A
July 2nd, 2007, 06:35 PM
Sure, use gui (file/add/new file or ctrl-N) to add a c & h file. Cut SearchRegion code and paste it into the new c file. Add a prototype for SearchRegion in the new h file and add an include for that h file in both your new and your old c file.

blahblahblah5038
July 3rd, 2007, 09:21 AM
Thank you again.

S_M_A
July 3rd, 2007, 09:39 AM
Your welcome