[gecode-users] failed to link with branch

Ronen Shouker rshouker at gmail.com
Thu Jul 11 01:26:33 CEST 2013

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
All I did was:

export CXX=clang
export CXXFLAGS=-stdlib=libc++

and then configure and make

Anything else I should have done?


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130711/9def3e5d/attachment.html>

More information about the users mailing list