Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Problems Linking with 2.5

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problems Linking with 2.5
#2827
Posted by: fparks 2003-11-02 03:03:15
Thanks to the help in this forum I was able to get my skeleton project up and doing some very good things after I had gotten past the linking problems I was having with 2.4.2.  I have decided that the future is trying the 2.5 daily snapshots.  Project compiles fine, but I'm having link problems again.  Platform XP Pro, DEV-C++ 4.9.8.4 and wxWindows 2.5.x from this past week.

Linker parameters are:

-lwxbase25
-lwxbase25_net
-lwxbase25_odbc
-lwxbase25_xml
-lwxexpat
-lwxjpeg
-lwxmsw25_adv
-lwxmsw25_core
-lwxmsw25_dbgrid
-lwxmsw25_deprecated
-lwxmsw25_gl
-lwxmsw25_html
-lwxpng
-lwxregex
-lwxtiff
-lwxzlib
-lwxmsw25_animate
-lwxmsw25_fl
-lwxmsw25_mmedia
-lwxmsw25_netutils
-lwxmsw25_ogl
-lwxmsw25_plot
-lwxmsw25_stc
-lwxmsw25_svg
-lwxmsw25_xrc
-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lodbc32
-lole32
-loleaut32
-luuid
-lrpcrt4
-ladvapi32
-lwsock32
-lstdc++
-lgcc
-lctl3d32
-lopengl32
-lglu32

Some of my messages are:

Compiler: Default compiler
Building Makefile: "D:ProjectsCMMSNGIMakefile.win"
Executing  make clean
rm -f objects/CMMSNGIApp.o objects/frmSplash.o objects/frmMain.o objects/frmLogin.o objects/frmLoginOptions.o objects/frmLanguage.o cmmsngi_private.res exe/cmmsngi.exe

g++.exe -D__DEBUG__ -c CMMSNGIApp.cpp -o objects/CMMSNGIApp.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wx25/include"  -I"C:/wx25/contrib/include"  -I"C:/wx25/include/wx" -g0 -mthreads -Wall -DWIN32 -D_WIN32 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -s -D__WINDOWS__  -fmessage-length=0 -fno-exceptions -fno-rtti   -g3

*****Error messages start here.

C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_imagjpeg.o)(.text+0x2ed):imagjpeg.cpp: undefined reference to `jpeg_resync_to_restart'
...
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_image.o)(.text+0x2d87):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'
...
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_main.o)(.text+0x2c):main.cpp: undefined reference to `wxEntry(int&, char**)'
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_dc.o)(.text+0x1bae):dc.cpp: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
..
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_textcmn.o)(.text+0xccc):textcmn.cpp: undefined reference to `wxFFile::wxFFile(char const*, char const*)'
...
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_sizer.o)(.text+0xa9e):sizer.cpp: undefined reference to `wxClientDataContainer::wxClientDataContainer()'
...
C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
...

mingw32-make.exe: *** [exe/cmmsngi.exe] Error 1

Execution terminated

Everything compiled fine and I have been able to compile and test many of the samples.  There are 92 errors in total, but I have cut everything down to an example of each.

Thanks in advance,

Frank
Message2. Re: Problems Linking with 2.5.1 and Dev-CPP 4.8.9.4 on XP
#2864
Posted by: fparks 2003-11-07 06:58:51
Please Help - I can't see the forest for the trees.

OK - I tried the WIKI and these directions with a rebuilt download 20031104 (see at the end):

minimal sample runs fine from the command line.

Now I try and compile my project and I get 72 errors all of them appear to be linking errors.

Compiler: Default compiler
Building Makefile: "D:ProjectsCMMSNGIMakefile.win"
Executing  make clean
rm -f objects/CMMSNGIApp.o objects/frmSplash.o objects/frmMain.o objects/frmLogin.o objects/frmLoginOptions.o objects/frmLanguage.o cmmsngi_private.res exe/cmmsngi.exe

g++.exe -c CMMSNGIApp.cpp -o objects/CMMSNGIApp.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

g++.exe -c ui/frmSplash.cpp -o objects/frmSplash.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

g++.exe -c ui/frmMain.cpp -o objects/frmMain.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

g++.exe -c ui/frmLogin.cpp -o objects/frmLogin.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

g++.exe -c ui/frmLoginOptions.cpp -o objects/frmLoginOptions.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

g++.exe -c ui/frmLanguage.cpp -o objects/frmLanguage.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/wxWindows-20031104/include"  -I"C:/wxWindows-20031104/contrib/include" -D__WXMSW__  -g -O0 -mthreads -Wall  -DSTRICT -fno-exceptions -fno-rtti 

windres.exe -i cmmsngi_private.rc -I rc -o cmmsngi_private.res -O coff

g++.exe objects/CMMSNGIApp.o objects/frmSplash.o objects/frmMain.o objects/frmLogin.o objects/frmLoginOptions.o objects/frmLanguage.o cmmsngi_private.res -o "execmmsngi.exe" -L"C:/Dev-Cpp/lib" -L"C:/wxWindows-20031104/lib/gcc_lib/" -mwindows -mthreads -Wl,--subsystem,windows -mwindows -lwxbase25 -lwxbase25_xml -lwxmsw25_adv -lwxmsw25_core -lwxexpat -lwxjpeg -lwxpng -lwxzlib -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -ltiff

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2d87):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2dbd):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2e1e):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2e57):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2e8d):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x2eee):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x30db):image.cpp: undefined reference to `wxFileOutputStream::wxFileOutputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3118):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3135):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x31a0):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x320b):image.cpp: undefined reference to `wxFileOutputStream::wxFileOutputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3248):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3265):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x32d0):image.cpp: undefined reference to `wxFileOutputStream::~wxFileOutputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x32f1):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x330a):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3327):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3351):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3373):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x3388):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x339a):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x4220):image.cpp: undefined reference to `wxFileInputStream::wxFileInputStream(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x423c):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_image.o)(.text+0x428e):image.cpp: undefined reference to `wxFileInputStream::~wxFileInputStream()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_main.o)(.text+0x2c):main.cpp: undefined reference to `wxEntry(int&, char**)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_dc.o)(.text+0x1bae):dc.cpp: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_dc.o)(.text+0x33f5):dc.cpp: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xccc):textcmn.cpp: undefined reference to `wxFFile::wxFFile(char const*, char const*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xcea):textcmn.cpp: undefined reference to `wxFFile::ReadAll(wxString*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xd38):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xdcc):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xe39):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xf5d):textcmn.cpp: undefined reference to `wxFFile::wxFFile(char const*, char const*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xf90):textcmn.cpp: undefined reference to `wxFFile::Write(void const*, unsigned)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0xfeb):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0x104a):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_textcmn.o)(.text+0x1108):textcmn.cpp: undefined reference to `wxFFile::Close()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xa9e):sizer.cpp: undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xb1c):sizer.cpp: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xb6e):sizer.cpp: undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xbec):sizer.cpp: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xccb):sizer.cpp: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xd9b):sizer.cpp: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.text+0xe6b):sizer.cpp: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxBookCtrlSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxBookCtrlSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxBookCtrlSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxBookCtrlSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV16wxStaticBoxSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV16wxStaticBoxSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV16wxStaticBoxSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV16wxStaticBoxSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV10wxBoxSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV10wxBoxSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV10wxBoxSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV10wxBoxSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxFlexGridSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxFlexGridSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxFlexGridSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxFlexGridSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'

C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV11wxGridSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV11wxGridSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV11wxGridSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV11wxGridSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV7wxSizer+0x98):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV7wxSizer+0x9c):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV7wxSizer+0xa0):sizer.cpp: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:/wxWindows-20031104/lib/gcc_lib//libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV7wxSizer+0xa4):sizer.cpp: undefined reference to `wxClientDataContainer::DoGetClientData() const'

mingw32-make.exe: *** [exe/cmmsngi.exe] Error 1

Execution terminated


Any help would be greatly appreciated.

Thank you very much,

Frank

*** -----

Integrating Dev-Cpp with the new Library



Run Dev-Cpp.
Open a wxWindows project, and open the project options dialog.
On the Parameters tab, enter the following for your c++ compiler options. ( -D__WXDEBUG__ -D__WXMSW__ -g -O0 -mthreads -Wall )
On the Parameters tab, enter the following for your linker options. ( -mthreads -Wl,--subsystem,windows -mwindows -lwx_mswd-2.5 -lwxjpegd -lwxpngd -lwxzlibd -mthreads -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -ltiff ) Note the library lwx_mswd-2.5. That will likely change depending on how your configure your build, and which version you are building, so just find it in the build lib folder, and grab the right name. ( libwx_mswd-2.5.a --> lwx_msw-2.5 )
On the Directories|Library tab, enter the lib directory for your special build. ( mine is C:wxmsw-debuglib )
On the Directories|Include tab, enter at least the following, per your own build :
( C:wxmsw-debuglibwxincludemswd-2.5 )
( C:wxinclude ) Note this is the MAIN include for your distribution, and not your special build.

Notes:
You may need to go into Tools|Compiler Options|Programs and change make.exe to mingw32-make.exe
If you get an error about "duplicate sections" you probably have an old copy of one of the libs floating around.
Conclusion

*** ----  Changed for my environment.
> Thanks to the help in this forum I was able to get my skeleton
> project up and doing some very good things after I had gotten
> past the linking problems I was having with 2.4.2.  I have
> decided that the future is trying the 2.5 daily snapshots.
> Project compiles fine, but I'm having link problems again.
> Platform XP Pro, DEV-C++ 4.9.8.4 and wxWindows 2.5.x from this
> past week.
>
> Linker parameters are:
>
> -lwxbase25
> -lwxbase25_net
> -lwxbase25_odbc
> -lwxbase25_xml
> -lwxexpat
> -lwxjpeg
> -lwxmsw25_adv
> -lwxmsw25_core
> -lwxmsw25_dbgrid
> -lwxmsw25_deprecated
> -lwxmsw25_gl
> -lwxmsw25_html
> -lwxpng
> -lwxregex
> -lwxtiff
> -lwxzlib
> -lwxmsw25_animate
> -lwxmsw25_fl
> -lwxmsw25_mmedia
> -lwxmsw25_netutils
> -lwxmsw25_ogl
> -lwxmsw25_plot
> -lwxmsw25_stc
> -lwxmsw25_svg
> -lwxmsw25_xrc
> -lkernel32
> -luser32
> -lgdi32
> -lcomdlg32
> -lwinspool
> -lwinmm
> -lshell32
> -lcomctl32
> -lodbc32
> -lole32
> -loleaut32
> -luuid
> -lrpcrt4
> -ladvapi32
> -lwsock32
> -lstdc++
> -lgcc
> -lctl3d32
> -lopengl32
> -lglu32
>
> Some of my messages are:
>
> Compiler: Default compiler
> Building Makefile: "D:ProjectsCMMSNGIMakefile.win"
> Executing  make clean
> rm -f objects/CMMSNGIApp.o objects/frmSplash.o
> objects/frmMain.o objects/frmLogin.o objects/frmLoginOptions.o
> objects/frmLanguage.o cmmsngi_private.res exe/cmmsngi.exe
>
> g++.exe -D__DEBUG__ -c CMMSNGIApp.cpp -o objects/CMMSNGIApp.o
> -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"
> -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"
> -I"C:/wx25/include"  -I"C:/wx25/contrib/include"
> -I"C:/wx25/include/wx" -g0 -mthreads -Wall -DWIN32 -D_WIN32
> -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -s
> -D__WINDOWS__  -fmessage-length=0 -fno-exceptions -fno-rtti 
> -g3
>
> *****Error messages start here.
>
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_imagjpeg.o)(.text+0x2ed):imagjpeg.cpp:
> undefined reference to `jpeg_resync_to_restart'
> ...
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_image.o)(.text+0x2d87):image.cpp:
> undefined reference to
> `wxFileInputStream::wxFileInputStream(wxString const&)'
> ...
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_main.o)(.text+0x2c):main.cpp:
> undefined reference to `wxEntry(int&, char**)'
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_dc.o)(.text+0x1bae):dc.cpp:
> undefined reference to `wxSystemOptions::GetOptionInt(wxString
> const&)'
> ..
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_textcmn.o)(.text+0xccc):textcmn.cpp:
> undefined reference to `wxFFile::wxFFile(char const*, char
> const*)'
> ...
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_sizer.o)(.text+0xa9e):sizer.cpp:
> undefined reference to
> `wxClientDataContainer::wxClientDataContainer()'
> ...
> C:/wx25/lib/gcc_lib/libwxmsw25_core.a(corelib_sizer.o)(.data$_ZTV15wxNotebookSizer+0x98):sizer.cpp:
> undefined reference to
> `wxClientDataContainer::DoSetClientObject(wxClientData*)'
> ...
>
> mingw32-make.exe: *** [exe/cmmsngi.exe] Error 1
>
> Execution terminated
>
> Everything compiled fine and I have been able to compile and
> test many of the samples.  There are 92 errors in total, but I
> have cut everything down to an example of each.
>
> Thanks in advance,
>
> Frank
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Mon 2021-9-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0