I tried to make a new program with Dev-C++ and upcase's DevPak. This was a blank project, started from scratch. I included all the compiler/linker instructions and downloaded the wxmsw library. The code compiles, and then it terminates with a bunch of linker errors.
C:/Dev-Cpp/lib/libwxmsw.a(app.o)(.text+0x5e8):app.cpp: undefined reference to `CreateBrushIndirect@4' C:/Dev-Cpp/lib/libwxmsw.a(app.o)(.text+0x5f6):app.cpp: undefined reference to `DeleteObject@4' C:/Dev-Cpp/lib/libwxmsw.a(app.o)(.text+0xbe7):app.cpp: undefined reference to `DeleteObject@4' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)(.text+0x205):icon.cpp: undefined reference to `CreateCompatibleDC@4' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)(.text+0x20f):icon.cpp: undefined reference to `CreateCompatibleDC@4' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)(.text+0x224):icon.cpp: undefined reference to `SelectObject@8' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)(.text+0x239):icon.cpp: undefined reference to `SelectObject@8' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)(.text+0x275):icon.cpp: undefined reference to `BitBlt@36' C:/Dev-Cpp/lib/libwxmsw.a(icon.o)
..................
C:/Dev-Cpp/lib/libwxmsw.a(enhmeta.o)(.text+0x7d7):enhmeta.cpp: undefined reference to `SetWinMetaFileBits@16' C:/Dev-Cpp/lib/libwxmsw.a(enhmeta.o)(.text+0x84e):enhmeta.cpp: undefined reference to `CopyEnhMetaFileA@8' C:/Dev-Cpp/lib/libwxmsw.a(quantize.o)(.text+0x19b1):quantize.cpp: undefined reference to `GetSystemPaletteEntries@16'
make.exe: *** [Textinator.exe] Error 1
Execution terminated
I'm running version 4.9.8.1 (MingW v3.2). on Windows 2000 SP4.
-Andrew
2. Re: Linker errors with Dev-C++
#2384
Posted by: 2003-07-09 14:42:00
Hmmm... very weird... Looks like you're missing some lib to be included in the linker settings dealing with all the DC stuff.
Just to make sure: "Dev-C++ and upcase's DevPak...I included all the compiler/linker instructions and downloaded the wxmsw library..." That doesn't mean you installed my devpack and then downloaded another precompiled lib and installed it, does it??
Anyway, here are my compiler and linker settings. Currently I really can't see what could be wrong... When you try, do a complete rebuild. Compiler: -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -fvtable-thunks -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fsave-memoized -s -O3 -fexpensive-optimizations -mwindows Linker: -L"x:/dev-cpp/lib" -lwxmsw -lole32 -lwsock32 -lcomctl32 -lctl3d32 -lgcc -lstdc++ -lshell32 -loleaut32 -ladvapi32 -luuid -lxpm -ltiff -ljpeg -lpng -lzlib
Have you tried compiling the template I included? It should create a very basic app (just a frame). Did that work?