Computer Science Canada Multiple Errors Compiling with Dev-C++ |
Author: | QuantumPhysics [ Tue Dec 25, 2012 6:20 pm ] | ||||||
Post subject: | Multiple Errors Compiling with Dev-C++ | ||||||
main.cpp
resource.h
I get multiple errors when compiling the project. I need help solving these errors to be able to compile. I also need to ask, what the source of the error is and what it means. Here is the error log my compiler gives me (in order): 5 C:\Users\Admin\Desktop\postgresSQL\main.cpp 7:1 C:\Users\Admin\Desktop\postgresSQL\resource.h In file included from main.cpp [Warning] "IDOK" redefined 4 C:\Dev-Cpp\include\windows.h:55, from main.cpp In file included from C:/Dev-Cpp/include/windows.h:55, from main.cpp 4 C:\Users\Admin\Desktop\postgresSQL\main.cpp from main.cpp 765:1 C:\Dev-Cpp\include\winuser.h [Warning] this is the location of the previous definition C:\Users\Admin\Desktop\postgresSQL\main.cpp In function `BOOL AppDlgProc(HWND__*, UINT, WPARAM, LPARAM)': 14 C:\Users\Admin\Desktop\postgresSQL\main.cpp `GCLP_HICON' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) 14 C:\Users\Admin\Desktop\postgresSQL\main.cpp `SetClassLongPtr' undeclared (first use this function) C:\Users\Admin\Desktop\postgresSQL\main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 31 C:\Users\Admin\Desktop\postgresSQL\main.cpp `InitCommonControls' undeclared (first use this function) C:\Users\Admin\Desktop\postgresSQL\Makefile.win [Build Error] [main.o] Error 1 [/code] RE: If it helps, this is my .rc (resource file):
Thanks, Merry Christmas! Sincerly ~ QP ![]() |
Author: | Insectoid [ Wed Dec 26, 2012 11:31 am ] |
Post subject: | RE:Multiple Errors Compiling with Dev-C++ |
All the errors are undefined symbols. That just means you tried to use something that doesn't exist. Either you forgot to write it, or you forgot to include it, or you forgot to use a namespace. In this case, the function SetClassLongPtr() doesn't exist, its argument GCLP_HICON does not exist, and the function InitCommonControls does not exist. |
Author: | QuantumPhysics [ Thu Dec 27, 2012 1:38 am ] |
Post subject: | RE:Multiple Errors Compiling with Dev-C++ |
Oh, alright, thanks haha. I got it working. I am so stupid aagh! I realized I opened the wrong file haha |