Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Help on Compile Libraries - Link Error

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

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Help on Compile Libraries - Link Error
#2684
Posted by: fparks 2003-09-29 13:22:12
I had everything working and then tried to separate out things between projects and general compile & link options.

Compile Options:

-fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -DWINVER=0x400 -D__WIN95__ -DSTRICT -D__WXDEBUG__ -g -mthreads

Link Options:

-lwxmsw -lregex -lpng -ljpeg -lzlib -ltiff -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lgdi32 -lcomdlg32 -luser32 -lgmon

Project Library Directories:

C:wx2lib
C:wx2libmsw
C:wx2libmswmx
C:wx2contriblib

Project Include Directories:

c:wx2include
C:wx2includewxmsw

General Library Directories:

C:Dev-Cpplib


General C++ Include Directories:

C:Dev-Cppincludec++
C:Dev-Cppincludec++mingw32
C:Dev-Cppincludec++backward
C:Dev-Cppinclude

I'm getting the following error:

main.o(.data$_ZTV7MainApp+0xa0): In function `ZN7MainApp6OnInitEv':
C:/Documents and Settings/Frank L. Parks/My Documents/EzBizPartner/Test C+++/NewTestProject/main.cpp:61: undefined reference to `wxAppBase::OnAssert(char const*, int, char const*, char const*)'
main.o(.text$_ZN8wxStringC1ERKS_+0x41): In function `Z11wxCreateAppv':

C:/Documents and Settings/Frank L. Parks/My Documents/EzBizPartner/Test C+++/NewTestProject/main.cpp:52: undefined reference to `wxAssert(int, char const*, int, char const*, char const*)'

(I figured out how to use the copy feature - soooo much better than typing in everything by hand.)

I had it working once.  I think I accidentally erased a Library Directory from my list.

Any help would be geatly appreciated, now that it appears to be working as advertised.  Great pair of products.

Thanks in advance.
Message2. Re: Help on Compile Libraries - Link Error
#2685
Posted by: guidance 2003-09-29 13:29:18
Don't put in directory with spaces in its path name may help.
Message3. Re: Help on Compile Libraries - Link Error
#2686
Posted by: fparks 2003-09-29 13:44:09
O thought about from previous posts.  After your posts I moved it.  Same generic output.

Compiler: Default compiler
Building Makefile: "C:Test-C-ProjectsNewTestProjectMakefile.win"
Finding dependencies for file: C:Test-C-ProjectsNewTestProjectmain.cpp
Executing  make...
mingw32-make.exe -f "C:Test-C-ProjectsNewTestProjectMakefile.win" all
g++.exe -D__DEBUG__ -c main.cpp -o main.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:/wx2/include"  -I"C:/wx2/include/wx/msw" -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -DWINVER=0x400 -D__WIN95__ -DSTRICT -D__WXDEBUG__ -g -mthreads   -g3

g++.exe -D__DEBUG__ main.o  -o "NewTestProject.exe" -L"C:/Dev-Cpp/lib" -L"C:/wx2/lib" -L"c:/wx2/lib/msw" -L"C:/wx2/lib/msw/wx" -L"C:/wx2/contrib/lib" -mwindows -lwxmsw -lregex -lpng -ljpeg -lzlib -ltiff -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lgdi32 -lcomdlg32 -luser32 -lgmon

main.o(.data$_ZTV7MainApp+0xa0): In function `ZN7MainApp6OnInitEv':
C:/Test-C-Projects/NewTestProject/main.cpp:61: undefined reference to `wxAppBase::OnAssert(char const*, int, char const*, char const*)'
main.o(.text$_ZN8wxStringC1ERKS_+0x41): In function `Z11wxCreateAppv':
C:/Test-C-Projects/NewTestProject/main.cpp:52: undefined reference to `wxAssert(int, char const*, int, char const*, char const*)'

mingw32-make.exe: *** [NewTestProject.exe] Error 1

Execution terminated

As you can see - no spaces.  I'm getting closer to getting this to work right.

Thanks Guidance for giving it a try.
Message4. Re: Help on Compile Libraries - Link Error
#2687
Posted by: guidance 2003-09-29 14:53:12
Have you tried this precompiled library?
http://g.yi.org/f.php?f=14288
Message5. Re: Help on Compile Libraries - Link Error
#5081
Posted by: 2004-09-15 08:32:35
What is this precompiled binary that you are talking about ?

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-12-14  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0