libfpx

Patrick Welche <[email protected]> Thu, 15 Apr 2004 13:08:10 +0100
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
I tried to build 2 Apr GM with libfpx, but there seems to be a "libfpx is
written in C++" problem at the libtool linking stage:

/bin/sh ../libtool --silent --mode=link --tag=CC gcc  -g -O2 -Wall -pthread   -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/local/lib -o gm -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/local/lib -export-dynamic gm.o ../magick/libGraphicsMagick.la ../ltdl/libltdlc.la 
/usr/local/lib/libfpx.so: undefined reference to `operator new[](unsigned)'
/usr/local/lib/libfpx.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libfpx.so: undefined reference to `operator delete(void*)'
/usr/local/lib/libfpx.so: undefined reference to `__gxx_personality_v0'
/usr/local/lib/libfpx.so: undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libfpx.so: undefined reference to `std::ios_base::Init::Init()'
/usr/local/lib/libfpx.so: undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/local/lib/libfpx.so: undefined reference to `operator delete[](void*)'
/usr/local/lib/libfpx.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'
/usr/local/lib/libfpx.so: undefined reference to `std::ios_base::Init::~Init()'
/usr/local/lib/libfpx.so: undefined reference to `operator new(unsigned)'

On my system (NetBSD 2), the libtool line becomes:

gcc -g -O2 -Wall -Wl,-R/usr/local/lib -Wl,-R/usr/X11R6/lib -o .libs/gm -Wl,-R/usr/local/lib -Wl,-R/usr/X11R6/lib gm.o -Wl,--export-dynamic  -pthread -L/usr/local/lib -L/usr/X11R6/lib ../magick/.libs/libGraphicsMagick.so /usr/local/lib/libfreetype.so /usr/local/lib/libjpeg.so.62.0 -lpng /usr/local/lib/libfpx.so -ldpstk -ldps -lXext -lSM -lICE -lX11 -lbz2 /usr/local/lib/libxml2.so -lz -lm -lpthread ../ltdl/.libs/libltdlc.a -Wl,--rpath -Wl,/usr/local/lib

If I change that gcc to g++, I get a working gm. (Don't have a flashpix to
test that bit on) (Hmm.. similarlities with that link with the linker or
the compiler thread..) 

(BTW it was libfpx-1.2.0.9, and though _UNIX was automatically defined, I
had to define __unix. Should s/__unix/_UNIX/g in libfpx-1.2.0.9?)

Cheers,

Patrick


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click