Really Annoying Error - Fixed
I've been getting this error since typing this code in that I've had working before:
main.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "bool __cdecl UnregisterWindowClasses(struct HINSTANCE__ *)" (?UnregisterWindowClasses@@YA_NPAUHINSTANCE__@@@Z)
UnregisterWindowClass is a function of my own. It wouldn't be such a big problem but I'm getting it 10 different times on other functions like RegisterClass, etc...
It's definately possible I don't have something linked right in C++ Express Edition because last time I compiled it in the older C++ compiler. I linked it enough so Windows.h wouldn't error but I think it's not finding these basic Windows functions.
I already tried deleting the .obj and recompiling. Any ideas?
[Edited by - programmermattc on September 27, 2006 5:01:01 PM]
Don't use function names that are already defined in windows.h. If you have to use the names, #undefine them.
I'm not, I'm using the predefined RegisterClass inside my RegisterWindowClasses() and the error is saying that using that predefined func in my own is wrong. (Sorry it sounded kind of like I named it RegisterClass)
Are you sure your project is set up as a Win32 application? AFAIK the compiler won't know to link against the Windows libraries if the project is merely set up as a console application.
P.S. Oops never mind, I didn't see the FIXED in the thread title. =0
P.S. Oops never mind, I didn't see the FIXED in the thread title. =0
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement