[ wxwindows-Bugs-1569045 ] wxrc link error

SourceForge.net noreply at sourceforge.net
Thu Nov 1 05:18:46 PDT 2007


Bugs item #1569045, was opened at 2006-10-02 04:12
Message generated for change (Comment added) made by neis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1569045&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Build -- bakefile
Group: Must fix
>Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Tobias Minich (belgabor)
>Assigned to: Vaclav Slavik (vaclavslavik)
Summary: wxrc link error

Initial Comment:
I get a linker error when compiling wxrc. I belive this
is related to the fact that I use the system expat lib.
Here is the linker command line:
g++ -o wxrc.exe wxrc_wxrc.o -mthreads    -L../../lib  
 -lexpat   -lwx_msw-2.7   -lwxregex-2.7  -mthreads  -lz
-lrpcrt4 -loleaut32 -lole32 -luuid -lodbc32 -lole32
-loleaut32 -lwinspool -lwinmm -lshell32 -lcomctl32
-lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 
-lpng -lz -ljpeg -ltiff

It fails with all the expat functions 'missing'. If I
hack the makefile to list -lexpat after the wx libs
(before -lpng) it works.

----------------------------------------------------------------------

>Comment By: Stefan Neis (neis)
Date: 2007-11-01 12:18

Message:
Logged In: YES 
user_id=32202
Originator: NO

Sorry, ignore my previous comment - it is nonsense. wxrc is not using
wx-config but its own  bakefile/Makefile, so it's rather a bakefile issue
than a shell script issue and my suggested change probably breaks wx-config
in addition to wxrc's Makefile being wrong.

Vaclav (or whoever knows the bakefile internals) can you have a look?

----------------------------------------------------------------------

Comment By: Stefan Neis (neis)
Date: 2007-10-31 09:42

Message:
Logged In: YES 
user_id=32202
Originator: NO

I'm not really comfortable with the shell code in wx-config, but I'll at
last try anyway:
Could you check if changing lines 1079 to 1085 (or similar) of
wx-config.in
from 
    # We still need the core lib deps for a static build though
    if is_static; then
        link_deps="${libdir}/libwx_ at TOOLCHAIN_NAME@.a" 
        wx_libs="$wx_libs $link_deps $ldlibs_core $ldlibs_base"
    else
        wx_libs="$wx_libs -lwx_ at TOOLCHAIN_NAME@"
    fi
to
    # We still need the core lib deps for a static build though
    if is_static; then
        link_deps="${libdir}/libwx_ at TOOLCHAIN_NAME@.a" 
        wx_libs="$link_deps $wx_libs $ldlibs_core $ldlibs_base"
    else
        wx_libs="-lwx_ at TOOLCHAIN_NAME@ $wx_libs"
    fi
(i.e. interchanging the first two arguments of wx_libs for the monolithic
case) and rerunning configure produces a wx-config that actually does work
as expected? 


----------------------------------------------------------------------

Comment By: Tobias Minich (belgabor)
Date: 2007-10-30 23:21

Message:
Logged In: YES 
user_id=573198
Originator: YES

Ok, it's been a year since I reported this, is there a good reason not to
fix it? It's still present in 2.8.6...

----------------------------------------------------------------------

Comment By: Lajos Molnar (orfanik)
Date: 2006-10-10 11:26

Message:
Logged In: YES 
user_id=621378

if i see right, the "-lexpat -lwx_gtk-2.7" should be 
"-lwx_gtk-2.7  -lexpat".


----------------------------------------------------------------------

Comment By: Lajos Molnar (orfanik)
Date: 2006-10-10 10:57

Message:
Logged In: YES 
user_id=621378

I have the same problem, with cygwin.


(if test -d utils/wxrc ; then cd utils/wxrc && make all ; fi)
make[1]: Entering directory
`/cygdrive/e/MinGW/wxWidgets/x11/utils/wxrc'
../.././bk-deps g++ -c -o wxrc_wxrc.o -D__WXGTK__    
-I../../../utils/wxrc  -DwxUSE_GUI=0 -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
-I../../lib/wx/include/gtk-ansi-release-static-2.7
-I../../../include -I/usr/include/gtk-1.2
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT
-I/usr/X11R6/include -DGTK_NO_CHECK_CASTS -Wall -Wundef
-Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing
../../../utils/wxrc/wxrc.cpp
g++ -o wxrc.exe wxrc_wxrc.o    -L../../lib    -lexpat  
-lwx_gtk-2.7     -lz -lpthread -liconv  -L/usr/lib
-L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lgthread -lglib
-lpthread -lintl -lXext -lX11 -lpng -lz -ljpeg -ltiff
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x398f):
undefined reference to `_XML_ParserCreate'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3a85):
undefined reference to `_XML_SetUserData'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3aa5):
undefined reference to `_XML_SetElementHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3abc):
undefined reference to `_XML_SetCharacterDataHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3adc):
undefined reference to `_XML_SetCdataSectionHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3af3):
undefined reference to `_XML_SetCommentHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3b0a):
undefined reference to `_XML_SetDefaultHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3b27):
undefined reference to `_XML_SetUnknownEncodingHandler'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3b9d):
undefined reference to `_XML_Parse'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3c3a):
undefined reference to `_XML_ParserFree'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3e4d):
undefined reference to `_XML_GetErrorCode'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3e55):
undefined reference to `_XML_ErrorString'
../../lib/libwx_gtk-2.7.a(monolib_xml.o):xml.cpp:(.text+0x3ebb):
undefined reference to `_XML_GetCurrentLineNumber'
Info: resolving _gtk_major_version by linking to
__imp__gtk_major_version (auto-import)
Info: resolving _gtk_minor_version by linking to
__imp__gtk_minor_version (auto-import)
Info: resolving _g_threads_got_initialized by linking to
__imp__g_threads_got_initialized (auto-import)
Info: resolving _gtk_micro_version by linking to
__imp__gtk_micro_version (auto-import)
collect2: ld returned 1 exit status
make[1]: *** [wxrc.exe] Error 1
make[1]: Leaving directory
`/cygdrive/e/MinGW/wxWidgets/x11/utils/wxrc'
make: *** [wxrc] Error 2


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1569045&group_id=9863




More information about the wx-dev mailing list