Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Linker errors with Dev-C++

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Linker errors with Dev-C++
#2382
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: "C:TextinatorMakefile.win"
Executing  make...
make.exe -f "C:TextinatorMakefile.win" 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(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
Message2. 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?

upcase
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥477.00 ·
 
 
¥918.00 ·
 
 
¥370.00 ·
 
 
¥271.00 ·
 
 
¥995.00 ·
 
 
¥1,580.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0