[gecode-users] failed to link with branch

Ronen Shouker rshouker at gmail.com
Thu Jul 11 02:07:58 CEST 2013


I will try it,
thanks a lot!


2013/7/11 Guido Tack <tack at gecode.org>

> Try the following call to configure Gecode:
>
> ./configure CC=clang CXX="clang++ -std=c++0x -stdlib=libc++"
>
> I just checked, this compiles, links and runs fine for me (Mac OS 10.8).
>
> Cheers,
> Guido
>
> On 11/07/2013, at 9:26 AM, Ronen Shouker <rshouker at gmail.com> wrote:
>
> Thank you Gustavo and Marco for your quick response.
> Tried building Gecode with clang and -stdlib=libc++, but failed.
> I'm now linking my project with old c++ standard library,
> but that's causing me some troubles
>  because I used some of the new features.
>
> I just wondering if I made all the necessary changes to build Gecode with
> Clang.
> All I did was:
>
> export CXX=clang
> export CXXFLAGS=-stdlib=libc++
>
> and then configure and make
>
> Anything else I should have done?
>
> 10x,
> Ronen
>
>
> 2013/7/11 Marco Correia <marco.v.correia at gmail.com>
>
>> On Jul 10, 2013, at 23:19 , Ronen Shouker <rshouker at gmail.com> wrote:
>>
>> >
>> >> [snip]
>> >> ... I have one error during link:
>> >>
>> >> Undefined symbol 'Gecode::branch(
>> >>  [snip]
>> >>    std::__1::basic_ostream<char,std::__1::char_traits<char> >&
>> >>  [snip]
>> >>
>> >
>> > After using nm to inspect the dylib:
>> > it seems that those __1:: that for some reason appear in the error
>> message
>> > (and therefore where produced by the compiler) are not in the gecode
>> dylib.
>> >
>> > Any Clues?
>>
>> (Disclaimer:  I am not a Gecode expert)
>>
>> I suspect the problem is the c++ standard library. With clang (the new
>> c++ compiler shipped with mac os) comes a new c++ standard lib, which you
>> can link to by specifying -stdlib=libc++ when compiling/linking you code.
>> To link with the old c++ standard lib you compile with -stdlib=libstdc++
>> instead.
>>
>> I suspect you compiled gecode with one of them are now are trying to
>> compile your example with the other one.
>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130711/b2c2656d/attachment.html>


More information about the users mailing list