[cfe-dev] build issues with c++ code on OpenBSD
rjmccall at apple.com
Mon Jul 26 15:21:01 PDT 2010
On Jul 26, 2010, at 3:11 PM, Vladimir Kirillov wrote:
> Hello, cfe-dev!
> I've been playing around with clang apis for some time lately
> both on Mac OS X (built with usual ./configure && make) and OpenBSD
> (built system g++ (4.2.1) with linker version scripts turned off
> (binutils 2.15) and --enable-targets=host,cbe,cpp).
> While clang++ builds example C++ code (using some stl) just fine
> (using includes and libstdc++ from gcc 4.2.4), it bails out with a
> bunch of 'undefined references' at link time on OpenBSD (OS X is just
> fine with same flags)
I would guess that you need to properly sort your link line. The Darwin linker doesn't require -l options to be topologically sorted by dependence, but most other linkers do.
More information about the cfe-dev