[gecode-users] Static libraries of Gecode 2.2.0

Martin Mann mmann at informatik.uni-freiburg.de
Thu Feb 19 15:05:35 CET 2009


Hi Raffaele,

the linker error you get might be about the order of the libraries. At 
least I had similar problems some time ago using cygwin and found some 
documentation on g++ that confirmed this.

Hope it helps,

Martin

Raffaele Cipriano schrieb:
> Christian Schulte ha scritto:
>> You have to specify the compilers. For cygwin, please install gcc-4 and its
>> additional packages and then
>>
>> ./configure --enable-static CC=gcc-4 CXX=g++-4
>>
>>   
> Thank you, I've done in this way and I've installed gecode correctly 
> with static libraries.. but I have still problems in linking phase: I 
> report an extracts of the error messages: What I'm doing wrong?
> 
> Thank you very much.
> 
>> Then, a tip: don't use gcc. Use cl instead, check the mailing list archives
>> how to do that.
>>
>>   
> Yes, I will try in the near future.. unfortunately now I need to work 
> with Cygwin...
> 
> Cheers
> Raffaele
> 
> 
> **** Build of configuration Debug for project QueensGecode3 ****
> 
> make -k all
> Building target: Queens.exe
> Invoking: GCC C++ Linker
> g++ -L/cygdrive/c/Programmi/gecode-2.2.0 -o"Queens.exe"  ./main.o  
> ./support/example.o ./support/options.o   -lgecodesupport -lgecodekernel 
> -lgecodesearch -lgecodeint -lgecodeset -lgecodecpltset -lgecodeminimodel 
> -lgecodeserialization
> 
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(exception.o):exception.cc:(.eh_frame+0x11): 
> undefined reference to `___gxx_personality_v0'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `_Alloc_hider':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/basic_string.h:253: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o):/cygdrive/c/Programmi/gecode-2.2.0/gecode/support/symbol.cc:183: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `free':
> /cygdrive/c/Programmi/gecode-2.2.0/./gecode/support/memory.icc:98: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/./gecode/support/memory.icc:98: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `__ostream_insert<char, std::char_traits<char> >':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream_insert.h:115: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o):/cygdrive/c/Programmi/gecode-2.2.0/gecode/support/symbol.cc:145: 
> more undefined references to `__Unwind_Resume' follow
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `_ZNSolsEi':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:119: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `Symbol':
> /cygdrive/c/Programmi/gecode-2.2.0/gecode/support/symbol.cc:138: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o): In 
> function `basic_stringstream':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/sstream:511: undefined 
> reference to `__Unwind_Resume'
> [...]
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o):symbol.cc:(.gcc_except_table+0x4e4): 
> undefined reference to `typeinfo for __cxxabiv1::__forced_unwind'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o):symbol.cc:(.gcc_except_table+0x660): 
> undefined reference to `typeinfo for __cxxabiv1::__forced_unwind'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodesupport.a(symbol.o):symbol.cc:(.eh_frame+0x12): 
> undefined reference to `___gxx_personality_v0'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodekernel.a(var-type.o):var-type.cc:(.eh_frame+0x11): 
> undefined reference to `___gxx_personality_v0'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodekernel.a(core.o): In 
> function `~Space':
> /cygdrive/c/Programmi/gecode-2.2.0/gecode/kernel/core.cc:211: undefined 
> reference to `__Unwind_Resume'
> [...]
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/ostream:517: undefined 
> reference to `std::basic_ostream<char, std::char_traits<char> >& 
> std::__ostream_insert<char, std::char_traits<char> 
>  >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/ostream:517: undefined 
> reference to `std::basic_ostream<char, std::char_traits<char> >& 
> std::__ostream_insert<char, std::char_traits<char> 
>  >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(dfa.o): In function 
> `_ZNSolsEi':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:119: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(dfa.o): In function 
> `operator<< <std::char_traits<char> 
>  >':/usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/ostream:517: undefined 
> reference to `std::basic_ostream<char, std::char_traits<char> >& 
> std::__ostream_insert<char, std::char_traits<char> 
>  >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(dfa.o): In function 
> `operator<< <std::char_traits<char> >':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:119: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::__ostream_insert<char, std::char_traits<char> 
>  >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(dfa.o): In function 
> `_ZNSolsEi':
> [..]
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o):/cygdrive/c/Programmi/gecode-2.2.0/./gecode/kernel/branching.icc:306: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o):/cygdrive/c/Programmi/gecode-2.2.0/./gecode/kernel/branching.icc:306: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o):/cygdrive/c/Programmi/gecode-2.2.0/./gecode/kernel/branching.icc:306: 
> more undefined references to `__Unwind_Resume' follow
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o): In function 
> `_ZNSolsEi':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:119: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:117: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o):/cygdrive/c/Programmi/gecode-2.2.0/./gecode/int/branch/select-val.icc:73: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(branch.o): In function 
> `basic_stringstream':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/sstream:511: undefined 
> reference to `__Unwind_Resume'
> [...]
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:119: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:117: 
> undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>  >& std::basic_ostream<char, std::char_traits<char> 
>  >::_M_insert<long>(long)'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(int-set.o): In 
> function `__ostream_insert<char, std::char_traits<char> >':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream_insert.h:115: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(int-set.o): In 
> function `sentry':
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/include/c++/bits/ostream.tcc:232: 
> undefined reference to `__Unwind_Resume'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(int-set.o):int-set.cc:(.gcc_except_table+0x1a0): 
> undefined reference to `typeinfo for __cxxabiv1::__forced_unwind'
> /cygdrive/c/Programmi/gecode-2.2.0/libgecodeint.a(int-set.o):int-set.cc:(.eh_frame+0x12): 
> undefined reference to `___gxx_personality_v0'
> collect2: ld returned 1 exit status
> make: *** [Queens.exe] Error 1
> make: Target `all' not remade because of errors.
> Build complete for project QueensGecode3
> 
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

-- 
Martin Mann, Dipl. Bioinf.
Bioinformatics - Inst. of Computer Science
Albert-Ludwigs-University Freiburg
Tel: ++49-761-203-8259
Fax: ++49-761-203-7462
http://www.bioinf.uni-freiburg.de/~mmann/




More information about the gecode-users mailing list