Opened 9 years ago

Last modified 9 years ago

#3080 closed defect

undefined reference to wx_regerror, etc.

Reported by: andrewziem Owned by: mweth
Priority: normal Milestone:
Component: Version:
Keywords: Cc: andrewziem, mweth
Blocked By: Blocking:
Patch: no

Description

I believe the problem is that "wx-config --libs" should
include "libwxregexud-2.6.a".

I had a very similar problem with wx 2.6.2 and below is
2.6.3 RC1. As a workaround, I add
"/usr/local/lib/libwx*" after "wx-config --libs", but I
prefer a cleaner solution.

I am on Fedora Core 4 with GCC 4.0. Also, I have a
similar problem cross-compiling from Linux to MinGW
with wxWidgets 2.6.2.

wxwidgets:
$ make DEBUG=YES
g++ -c -g -W -Wall -DDEBUG wx-config --cxxflags
-I../misc -I../cal configuration.cpp -o configuration.o
g++ -o cdaywx ../misc/scaldate.o ../cal/french.o
../cal/cal.o ../misc/jdn_l.o ../cal/jewish.o
../cal/julian.o ../misc/commafmt.o ../cal/maya.o
../cal/shire.o ../cal/stardate.o ./calendar.o
./configuration.o ./library.o ./general.o ./cdaywx.o
wx-config --libs
/usr/local/lib/libwx_gtk2ud-2.6.a(monolib_regex.o)(.text+0x8e):
In function `wxRegExImpl::GetErrorMsg(int, bool) const':
./src/common/regex.cpp:249: undefined reference to
`wx_regerror'
/usr/local/lib/libwx_gtk2ud-2.6.a(monolib_regex.o)(.text+0xc8):./src/common/regex.cpp:254:
undefined reference to `wx_regerror'
/usr/local/lib/libwx_gtk2ud-2.6.a(monolib_regex.o)(.text+0x293):
In function `wxRegExImpl::Compile(wxString const&, int)':
./src/common/regex.cpp:300: undefined reference to
`wx_re_comp'
/usr/local/lib/libwx_gtk2ud-2.6.a(monolib_regex.o)(.text+0x630):
In function `wxRegExImpl::Matches(wchar_t const*, int,
unsigned int) const':
./src/common/regex.cpp:414: undefined reference to
`wx_re_exec'
/usr/local/lib/libwx_gtk2ud-2.6.a(monolib_regex.o)(.gnu.linkonce.t._ZN11wxRegExImpl4FreeEv[wxRegExImpl::Free()]+0x20):
In function `wxRegExImpl::Free()':
./src/common/regex.cpp:190: undefined reference to
`wx_regfree'
collect2: ld returned 1 exit status
make: * [cdaywx] Error 1

$ wx-config --libs
-L/usr/local/lib -pthread -L/usr/X11R6/lib
/usr/local/lib/libwx_gtk2ud-2.6.a -pthread
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
-lm -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lpng -lz
-ljpeg -lz -ldl -lm

$ wx-config --version-full
2.6.2.2

My configure command:
./configure --disable-compat24 --disable-htmlhelp
--disable-mshtmlhelp --without-sdl --without-odbc
--without-expat --without-libtiff --without-opengl
--disable-mdi --disable-gif --disable-pcx --disable-iff
--disable-shared --enable-unicode --enable-html
--enable-fs_zip --enable-zipstream --disable-no_rtti
--disable-no_exceptions --enable-gtk2 --with-gnomeprint
--with-regex=builtin --enable-debug

Change History (1)

comment:1 Changed 9 years ago by mweth

Fixed on the 2.6.x branch.
Thanks!
Mike

Note: See TracTickets for help on using tickets.