[sigc] Re : Linking a file with .o files that use the libsig library



Thanks to John Wakely (libstdc++ gcc gnu org) the problem is fixed :

>>
>> Looks like pthread.h is including signal.h from sigc++, but it should be
>> including /usr/include./signal.h
>>
>> I suggest you remove the -I/home/autres/berger/stage2005/include/sigc++
>> compiler option, and instead use -I/home/autres/berger/stage2005/include/
>>
>> Then in your code, prefix sigc++ headers with the directory name:
>>
>> #include <sigc++/signal.h>
>>
>> That should prevent pthread.h from including the wrong signal.h
>>


Now, the program fails compiling on this next command :

---------------------------------------------------------------
g++ -o alphatest alphatest.o -I.. -I../gc/include
-I/home/autres/berger/stage2005/include/  -L/home/autres/berger/stage2005/lib
../elisa/.libs/libelisa.a ../gc/.libs/libelisaboehm.a -lpthread
/home/autres/berger/stage2005//lib/libultim.so
/home/autres/berger/stage2005/lib/libgaol
-L/home/autres/berger/stage2005/mathlib-0.0.1/lib/ -ldl -Wl,--rpath
-Wl,/home/autres/berger/stage2005//lib -Wl,--rpath
-Wl,/home/autres/berger/stage2005/lib -Wl,--rpath
-Wl,/home/autres/berger/stage2005//lib -Wl,--rpath
-Wl,/home/autres/berger/stage2005/lib
----------------------------------------------------------------


With that following error message :

---------------------------------------------------------------------------
../elisa/.libs/libelisa.a(elisa_interval_optimizer.o)(.gnu.linkonce.t._ZN4sigc7signal1IvPN5elisa5ModelENS_3nilEED1Ev+0xd):
In function `sigc::signal1<void, elisa::Model*, sigc::nil>::~signal1
[in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_optimizer.o)(.gnu.linkonce.t._ZN4sigc7signal1IvPN5elisa9ReductionENS_3nilEED1Ev+0xd):
In function `sigc::signal1<void, elisa::Reduction*, sigc::nil>::~signal1
[in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_optimizer.o)(.gnu.linkonce.t._ZN4sigc7signal1IvRN5elisa10SearchTreeENS_3nilEED1Ev+0xd):
In function `sigc::signal1<void, elisa::SearchTree&, sigc::nil>::~signal1
[in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZN4sigc8internal14temp_slot_listC1ERSt4listINS_9slot_baseESaIS3_EE+0x35):
In function
`sigc::internal::temp_slot_list::temp_slot_list[in-charge](std::list<sigc::slot_base,
std::allocator<sigc::slot_base> >&)':
: undefined reference to `sigc::slot_base::slot_base[in-charge]()'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZN4sigc8internal14temp_slot_listC1ERSt4listINS_9slot_baseESaIS3_EE+0x7e):
In function
`sigc::internal::temp_slot_list::temp_slot_list[in-charge](std::list<sigc::slot_base,
std::allocator<sigc::slot_base> >&)':
: undefined reference to `sigc::slot_base::~slot_base [in-charge]()'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZN4sigc8internal14temp_slot_listC1ERSt4listINS_9slot_baseESaIS3_EE+0x9b):
In function
`sigc::internal::temp_slot_list::temp_slot_list[in-charge](std::list<sigc::slot_base,
std::allocator<sigc::slot_base> >&)':
: undefined reference to `sigc::slot_base::~slot_base [in-charge]()'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZN4sigc8internal11signal_impl16unreference_execEv+0x54):
In function `sigc::internal::signal_impl::unreference_exec()':
: undefined reference to `sigc::internal::signal_impl::sweep()'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZSt10_ConstructIN4sigc9slot_baseES1_EvPT_RKT0_+0x34):
In function `void std::_Construct<sigc::slot_base,
sigc::slot_base>(sigc::slot_base*, sigc::slot_base const&)':
: undefined reference to `sigc::slot_base::slot_base[in-charge](sigc::slot_base
const&)'
../elisa/.libs/libelisa.a(elisa_real_var.o)(.gnu.linkonce.t._ZSt8_DestroyIN4sigc9slot_baseEEvPT_+0xd):
In function `void std::_Destroy<sigc::slot_base>(sigc::slot_base*)':
: undefined reference to `sigc::slot_base::~slot_base [in-charge]()'
../elisa/.libs/libelisa.a(elisa_variable.o)(.gnu.linkonce.t._ZN4sigc7signal4IvlPKvPPvlNS_3nilEED1Ev+0xd):
In function `sigc::signal4<void, long, void const*, void**, long,
sigc::nil>::~signal4 [in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_variable.o)(.gnu.linkonce.t._ZN4sigc7signal4IvlPKvPPvlNS_3nilEEC1Ev+0xd):
In function `sigc::signal4<void, long, void const*, void**, long,
sigc::nil>::signal4[in-charge]()':
: undefined reference to `sigc::signal_base::signal_base[not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_variable.o)(.gnu.linkonce.t._ZN4sigc7signal2IvPN5elisa7SubjectEPNS1_8ObserverENS_3nilEED1Ev+0xd):
In function `sigc::signal2<void, elisa::Subject*, elisa::Observer*,
sigc::nil>::~signal2 [in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_variable.o)(.gnu.linkonce.t._ZN4sigc7signal2IvPN5elisa7SubjectEPNS1_8ObserverENS_3nilEEC1Ev+0xd):
In function `sigc::signal2<void, elisa::Subject*, elisa::Observer*,
sigc::nil>::signal2[in-charge]()':
: undefined reference to `sigc::signal_base::signal_base[not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_strategy.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa12BoxReductionERNS1_21RealVarImplementationENS_3nilEED1Ev+0xd):
In function `sigc::signal2<void, elisa::BoxReduction&,
elisa::RealVarImplementation&, sigc::nil>::~signal2 [in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_strategy.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa12BoxReductionERNS1_21RealVarImplementationENS_3nilEEC1Ev+0xd):
In function `sigc::signal2<void, elisa::BoxReduction&,
elisa::RealVarImplementation&, sigc::nil>::signal2[in-charge]()':
: undefined reference to `sigc::signal_base::signal_base[not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_strategy.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa13HullReductionERSt3setIPNS1_22VariableImplementationENS1_9SetVarCmpESaIS6_EENS_3nilEED1Ev+0xd):
In function `sigc::signal2<void, elisa::HullReduction&,
std::set<elisa::VariableImplementation*, elisa::SetVarCmp,
std::allocator<elisa::VariableImplementation*> >&, sigc::nil>::~signal2
[in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_interval_strategy.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa13HullReductionERSt3setIPNS1_22VariableImplementationENS1_9SetVarCmpESaIS6_EENS_3nilEEC1Ev+0xd):
In function `sigc::signal2<void, elisa::HullReduction&,
std::set<elisa::VariableImplementation*, elisa::SetVarCmp,
std::allocator<elisa::VariableImplementation*> >&,
sigc::nil>::signal2[in-charge]()':
: undefined reference to `sigc::signal_base::signal_base[not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_newton_reduction.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa15NewtonReductionERSt6vectorIPNS1_21RealVarImplementationESaIS6_EENS_3nilEEC1Ev+0xd):
In function `sigc::signal2<void, elisa::NewtonReduction&,
std::vector<elisa::RealVarImplementation*,
std::allocator<elisa::RealVarImplementation*> >&,
sigc::nil>::signal2[in-charge]()':
: undefined reference to `sigc::signal_base::signal_base[not-in-charge]()'
../elisa/.libs/libelisa.a(elisa_newton_reduction.o)(.gnu.linkonce.t._ZN4sigc7signal2IvRN5elisa15NewtonReductionERSt6vectorIPNS1_21RealVarImplementationESaIS6_EENS_3nilEED1Ev+0xd):
In function `sigc::signal2<void, elisa::NewtonReduction&,
std::vector<elisa::RealVarImplementation*,
std::allocator<elisa::RealVarImplementation*> >&, sigc::nil>::~signal2
[in-charge]()':
: undefined reference to `sigc::signal_base::~signal_base [not-in-charge]()'
collect2: ld returned 1 exit status
make[2]: *** [alphatest] Erreur 1
make[2]: Quitte le répertoire `/home/autres/berger/stage2005/elisa-1.0.3/check'
make[1]: *** [check-am] Erreur 2
make[1]: Quitte le répertoire `/home/autres/berger/stage2005/elisa-1.0.3/check'
make: *** [check-recursive] Erreur 1
-------------------------------------------------------------------------

I'm sorry but I need your help !


Nicolas.



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