I am using codeblocks-8.02mingw-setup in Windows XP. While trying to compile the following code, I get the error:
Code:
/.......
case WM_CREATE:
{ CHOOSECOLOR col;
COLORREF color = RGB(0,0,0);
col.lStructSize=sizeof(CHOOSECOLOR);
col.hwndOwner=hwnd;
col.Flags=CC_SOLIDCOLOR;
col.lpCustColors=&color;
ChooseColor(&col);
}
break;
......./
Error:
Linking console executable: bin\Debug\test.exe
obj\Debug\main.o: In function `Z15WindowProcedureP6HWND__jjl@16':
C:/Documents and Settings/user/Desktop/test/main.cpp:84: undefined reference to `ChooseColorA@4'
collect2: ld returned 1 exit status
Can anyone help me on this?
Thanks
rittwik
Sorry, forget to mention that the problem is occuring only with MinGw 4.2.1. There is no problem compiling the code with Borland C++ 5.5.
Thanks
rittwik
Hi !
Did you check in your project settings that comdlg32 is present in the linker properties ?
Dje
Thanks Dje, it works now... :D
rittwik