On Thu, May 14, 2015 at 09:09:57PM +0200, Georg Baum wrote:
> Enrico Forestieri wrote:
> 
> > $ cd build
> > $ make alltests
> > ...
> >   CXXLD  check_trivstring
> > Undefined                       first referenced
> >  symbol                             in file
> > _ZNK3lyx14trivial_stringIcE5c_strEv check_trivstring.o
> > _ZNK3lyx14trivial_stringIwE5c_strEv check_trivstring.o
> > ld: fatal: Symbol referencing errors. No output written to
> > check_trivstring make[5]: *** [check_trivstring] Error 1
> > make[5]: Leaving directory `/opt/src/lyx/lyx-devel/build/src/support'
> > make[4]: *** [check-am] Error 2
> > make[4]: Leaving directory `/opt/src/lyx/lyx-devel/build/src/support'
> > make[3]: *** [check] Error 2
> > make[3]: Leaving directory `/opt/src/lyx/lyx-devel/build/src/support'
> > make[2]: *** [check-recursive] Error 1
> > make[2]: Leaving directory `/opt/src/lyx/lyx-devel/build/src'
> > make[1]: *** [check] Error 2
> > make[1]: Leaving directory `/opt/src/lyx/lyx-devel/build/src'
> > make: *** [check-recursive] Error 1
> 
> This is strange. Can you post the full linker command line please?

Sure. This is on Solaris:

g++ -fPIC -O2    -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/lib 
-Wl,-R/opt/lib -L/usr/X11/lib -Wl,-R/usr/X11/lib  -o check_trivstring 
check_trivstring.o dummy_functions.o boost.o liblyxsupport.a -liconv 
../../boost/liblyxboost.a -L/opt/qt5/lib -lQt5Core    -laspell  -liconv -lz 
-lmagic
Undefined                       first referenced
 symbol                             in file
_ZNK3lyx14trivial_stringIcE5c_strEv check_trivstring.o
_ZNK3lyx14trivial_stringIwE5c_strEv check_trivstring.o
ld: fatal: Symbol referencing errors. No output written to check_trivstring
make[5]: *** [check_trivstring] Error 1


but it is more clear on Cygwin:

g++ -O2    -L/usr/local/lib -shared-libgcc -o check_trivstring.exe 
check_trivstring.o dummy_functions.o boost.o liblyxsupport.a -liconv 
../../boost/liblyxboost.a -L/usr/local/qt5/lib -L/usr/lib/w32api 
-L/usr/local/lib -lQt5Core -lole32 -luuid -ladvapi32 -lshell32 -luser32 
-lkernel32 -liconv -lspawn -lz -licui18n -licuuc -licudata -lpcre16 -lm  
-lshlwapi -laspell -lgdi32  -liconv -lz -lmagic
check_trivstring.o:check_trivstring.cpp:(.text+0xef): undefined reference to 
`lyx::trivial_string<char>::c_str() const'
check_trivstring.o:check_trivstring.cpp:(.text+0x1a47): undefined reference to 
`lyx::trivial_string<unsigned int>::c_str() const'
collect2: error: ld returned 1 exit status
Makefile:570: recipe for target 'check_trivstring.exe' failed
make[5]: *** [check_trivstring.exe] Error 1

-- 
Enrico

Reply via email to