Guidance Forums / wxWidgets (wxWindows) in C++ / Linker errors with Dev-C++

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Linker errors with Dev-C++
Posted by: 2003-07-09 08:10:40
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.

Here's the compile log:
Compiler: Default compiler
Building Makefile: ""
Executing  make...
make.exe -f "" all
g++.exe Textinator.o  -o "Textinator.exe" -L"C:/Dev-Cpp/lib" -lwxmsw -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid

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(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 (MingW v3.2). on Windows 2000 SP4.

Message2. Re: Linker errors with Dev-C++
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.
-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
-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?

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Thu 2024-5-30  Guidance Laboratory Inc. Hits:0