Boost logo

Boost-Build :

Subject: Re: [Boost-build] undefined reference when using wxwidgets libraries
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2012-01-16 09:02:08


You should try the -d2 option to see if the libraries you want to link against are actually used and the proper link option (auto-import) is used. Do the other tools link against the dll or the import library i.e. lib.a?

-----Original Message-----
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of mds_maillists_at_[hidden]
Sent: Saturday, January 14, 2012 3:18 PM
To: boost-build_at_[hidden]
Subject: [Boost-build] undefined reference when using wxwidgets libraries

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.


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