Boost logo

Boost-Build :

Subject: Re: [Boost-build] undefined reference when using wxwidgets libraries
From: mds_maillists_at_[hidden]
Date: 2012-01-16 15:05:02


Hi Chris,

thank you very much for your answer.
The -d2 option doesn't show me some news, so I rechecked, if the
eclipse ide compiles against the import-libs or the .a as you suggested.
Neither does work, so the eclipse ide links
against the *.dll.

But now it works, the <cxxflags> was missing and
I changed the <file> to the "<name> & <search>"
without the .dll file extension.

The last one I did some more times before, so I think the solution is the
<cxxflags>.

Thanks for your help and maybe it helps others, if I publish the end version of my jamfile.

import os ;

local
WXWIDGETS = [ os.environ WXWIDGETS ] ;

lib wxbase292u_gcc_custom : : <name>wxbase292u_gcc_custom <search>$(WXWIDGETS)
/lib/gcc_dll ;
lib wxmsw292u_adv_gcc_custom : : <name>wxmsw292u_adv_gcc_custom <search>$(WXWIDGETS)/lib/gcc_dll ;
lib
wxmsw292u_core_gcc_custom : : <name>wxmsw292u_core_gcc_custom <search>$(WXWIDGETS)/lib/gcc_dll ;

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
                 <cxxflags>"-Wall -c -fmessage-length=0"
                 <linkflags>"
-Wl,--enable-auto-import"
                 <variant>"release"
                 <define>"__WXMSW__" ;

Thank you again.

Michael

----Ursprüngliche Nachricht----
Von: Chris.Nogradi_at_[hidden]
Datum: 16.01.2012 15:02
An:
"mds_maillists_at_[hidden]"<mds_maillists_at_[hidden]>
Betreff: RE: [Boost-build] undefined reference when using
wxwidgets libraries

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_lists.boost.
org] 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