Opened 12 years ago

Last modified 12 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


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.

$ 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
In function `wxRegExImpl::GetErrorMsg(int, bool) const':
./src/common/regex.cpp:249: undefined reference to
undefined reference to `wx_regerror'
In function `wxRegExImpl::Compile(wxString const&, int)':
./src/common/regex.cpp:300: undefined reference to
In function `wxRegExImpl::Matches(wchar_t const*, int,
unsigned int) const':
./src/common/regex.cpp:414: undefined reference to
In function `wxRegExImpl::Free()':
./src/common/regex.cpp:190: undefined reference to
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

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 12 years ago by mweth

Fixed on the 2.6.x branch.

Note: See TracTickets for help on using tickets.