Boost logo

Boost-Build :

Subject: [Boost-build] undefined reference when using wxwidgets libraries
From: mds_maillists_at_[hidden]
Date: 2012-01-14 16:18:01


Hi all,

I have a smalle shared library which I can't compile with bjam.
My Jamfile looks like this:

import os ;
local
WXWIDGETS = [ os.environ WXWIDGETS ] ;

lib wxbase292u_gcc_custom : : <file>$(WXWIDGETS)
/lib/gcc_dll/wxbase292u_gcc_custom.dll ;
lib wxmsw292u_adv_gcc_custom : : <file>$(WXWIDGETS)
/lib/gcc_dll/wxmsw292u_adv_gcc_custom.dll ;
lib wxmsw292u_core_gcc_custom : : <file>$(WXWIDGETS)
/lib/gcc_dll/wxmsw292u_core_gcc_custom.dll ;

#explicit wxbase292u_gcc_custom ;
#explicit wxmsw292u_adv_gcc_custom ;

#explicit wxmsw292u_core_gcc_custom ;

lib configFile : [ glob src/*.cpp : .git ]
                 
wxbase292u_gcc_custom/<link>shared
                 wxmsw292u_adv_gcc_custom/<link>shared
                 wxmsw292u_core_gcc_custom/<link>shared

               : <include>$(WXWIDGETS)/include
                 <include>$(WXWIDGETS)/lib/gcc_dll/mswu
               : <link>shared

                 <linkflags>"-Wl,--enable-auto-import"
                 <variant>"release"
                <define>"__WXMSW__" ;

I'm trying
to compile on windows xp and it doesn't matter if I'm using bjam as downloaded binary or
if I'm compiling bjam by
myself.
My compiler is gcc 4.4.0 MingW.

I don't have any problems with the libraries which doesn't depend on wxwidgets
libraries.
The error messages looks like this:

E:\Mike\30001_projects\001_plexso_source\libs\configFile>bjam
...
patience...
...found 450 targets...
...updating 2 targets...
gcc.link.dll bin\gcc-mingw-4.4.0\release\libconfigFile.dll.
a
Creating library file: bin\gcc-mingw-4.4.0\release\libconfigFile.dll.abin\gcc-mi
ngw-4.4.0\release\src\configFile.o:
configFile.cpp:(.text+0x17a): undefined refer
ence to `wxGetDisplaySize()'
bin\gcc-mingw-4.4.0\release\src\configFile.o:
configFile.cpp:(.text+0xe35): undef
ined reference to `wxConvLibcPtr'
bin\gcc-mingw-4.4.0\release\src\configFile.o:
configFile.cpp:(.text+0xe49): undef
ined reference to `wxString::AsChar(wxMBConv const&) const'
bin\gcc-mingw-4.4.0
\release\src\configFile.o:configFile.cpp:(.text+0xe65): undef
ined reference to `wxPrivate::GetUntypedNullData()'

bin\gcc-mingw-4.4.0\release\src\configFile.o:configFile.cpp:(.text+0xeac): undef
ined reference to `wxPrivate::
GetUntypedNullData()'
bin\gcc-mingw-4.4.0\release\src\configFile.o:configFile.cpp:(.text+0xec5): undef
ined reference
to `wxPrivate::GetUntypedNullData()'
bin\gcc-mingw-4.4.0\release\src\configFile.o:configFile.cpp:(.text+0xf99): undef

ined reference to `wxGet_wxConvLibcPtr()'
bin\gcc-mingw-4.4.0\release\src\configFile.o:configFile.cpp:(.text+0xf9e):
undef
ined reference to `wxConvLibcPtr'
bin\gcc-mingw-4.4.0\release\src\configFile.o:configFile.cpp:(.text+0x16cb):
unde

Thats only a short part of the complete output.

Can somebody help me? I tried everything I found on the
internet, but nothing worked.

BTW, I can compile the project without any problem with eclipse/cdt and the same
libraries.
I also compiled the wxwidgets libraries with the same mingw version! But with the makefile.gcc ...

Thanks
for any help.

Michael


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk