[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libltdl problems with C++ library

From: Olivier Boudeville
Subject: libltdl problems with C++ library
Date: Sun, 02 Jul 2006 11:23:10 +0200
User-agent: Mozilla Thunderbird 1.0.8 (X11/20060502)

Hi everybody,

I am trying to use libtool and libltdl to develop a C++ library (named
Ceylan) that provides some services, including plugin support. Despite
the reading of libltdl documentation and of the autobook, I am facing
link problems with the unit test (testCeylanPlugin) for plugin support
(test plugin is, it would need some other services
provided by, as if the STL symbols could not be found
despite the various flags :

creating .libs/testCeylanPluginS.c
generating symbol list for `testCeylanPlugin'
extracting global C symbols from

g++ -g -ggdb -O0 -fno-inline -Wall -Werror -Woverloaded-virtual -W
-Wfloat-equal -Wundef -Wendif-labels -Wshadow -Wpointer-arith
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare
-Wmissing-format-attribute -Wpacked -Wredundant-decls
-Wno-unused-parameter -ansi -pedantic-errors -o .libs/testCeylanPlugin
.libs/testCeylanPluginS.o testCeylanPlugin.o -Wl,--export-dynamic 
-L/home/sye/tmp-Ceylan-test-install/lib -L/usr/i686-pc-linux-gnu/bin
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/ -lm -lgcc_s -lc
/home/sye/tmp-Ceylan-test-install/lib/ -ldl -lpthread
-Wl,--rpath -Wl,/home/sye/tmp-Ceylan-test-install/lib
.libs/testCeylanPluginS.o:(.rodata+0x3044): undefined reference to
`std::_Base_bitset<(unsigned)1>::_M_do_find_next(unsigned, unsigned) const'
.libs/testCeylanPluginS.o:(.rodata+0x304c): undefined reference to
`std::_Base_bitset<(unsigned)1>::_M_do_find_first(unsigned) const'  
.libs/testCeylanPluginS.o:(.rodata+0x30c4): undefined reference to
.libs/testCeylanPluginS.o:(.rodata+0x3314): undefined reference to
.libs/testCeylanPluginS.o:(.rodata+0x331c): undefined reference to

(one thing I do not understand is why
"/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/" is specified
this way, I would have expected
"-L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 -lstdc++"; I tried to run
that command manually but the link error remained)

In I have indeed

but libtool says :

*** Warning: Linking the executable testCeylanPlugin against the
loadable module
*** is not portable!
libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen

In my I have :

testCeylanPlugin_SOURCES   =
testCeylanPlugin_LDFLAGS = -export-dynamic -no-undefined -dlpreopen
force -dlopen self -dlopen
testCeylanPlugin_LDADD   = $(LIBLTDL)
testCeylanPlugin_DEPENDENCIES = $(LIBLTDL)


ceylan_test_plugin_la_SOURCES =
ceylan_test_plugin_la_LDFLAGS = -no-undefined -module -avoid-version

I tried various combinations (specifying convenience/installable
libltdl, declaring the plugin with extern "C", using a pure-C plugin,
playing with the numerous link options in with no luck for
the moment.

Does anybody have a clue, or know the proper way to set up this ?

Thanks in advance,


PS: the desired layout would be : libCeylan (which is C++) can load any
plug-in, including C++ ones, including plug-in needing some services
provided by libCeylan and the STL

reply via email to

[Prev in Thread] Current Thread [Next in Thread]