|
From: <or...@vp...> - 2003-08-14 09:37:09
|
Pavel Tomáško wrote: > Please, > How can I use common conrtols in Win GUI Application in Dev C++ ? When I add > '#include <commctrl.h>' to the begin of source file and try to call > 'InitCommonControls()', error code > > ' [Linker error] undefined reference to InitCommonControls@0 ' > > appears. I tried to add the 'libcomctl32.a' to the project (Prject/Project > Options/Parameters/Add Library or Object), but then linker said > > ' ../../lib/libcomctl32.a C:\DEV-CPP\mingw32\bin\ld.exe file format not > recognized; treating as linker script' > '1 C:\DEV-CPP\mingw32\bin\lib\libcomctl32.a parse error'. > > What should I do to correct this ? I thank for every response. In Dev-C++ (actually, in GCC, the compiler in Dev-C++), you have to add libraries in the form: -l<libname>, if a library is named like this: lib<libname>.a So add -lcomctl32 to your linker settings. However, it seems more likely that you have a corrupted library. Download the win32 runtime from http://www.mingw.org. You need the headers and the import libraries. -- Greetings, Balázs |