Domanda

Any suggestions for resolving the following error (unknown option passed to ld) will be highly appreciated. The "buildit" script is the one from http://libcxx.llvm.org/ with the line

export TRIPLE=-apple-

added to it.

Thanks in advance


System Version: Mac OS X 10.6.8 (10K549)

$ clang++ -v

clang version 3.4 (trunk 192978) (llvm/trunk 192977) Target: x86_64-apple-darwin10.8.0 Thread model: posix

/usr/local/libcxx/lib: sudo ./buildit

for FILE in '../src/*.cpp' clang++ -c -g -Os -arch i386 -arch x86_64 -nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/algorithm.cpp for FILE in '../src/*.cpp'

...

clang algorithm.o bind.o chrono.o condition_variable.o debug.o exception.o future.o hash.o ios.o iostream.o locale.o memory.o mutex.o new.o optional.o random.o regex.o shared_mutex.o stdexcept.o string.o strstream.o system_error.o thread.o typeinfo.o utility.o valarray.o -arch i386 -arch x86_64 -o libc++.1.dylib -dynamiclib -nodefaultlibs -current_version 1 -compatibility_version 1 -install_name /usr/lib/libc++.1.dylib -lSystem -Wl,-unexported_symbols_list,libc++unexp.exp /usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,libc++abi.exp -Wl,-force_symbols_not_weak_list,notweak.exp -Wl,-force_symbols_weak_list,weak.exp -nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4 -U__STRICT_ANSI__

clang: warning: argument unused during compilation: '-nostdinc++'

clang: warning: argument unused during compilation: '-std=c++11'

ld: unknown option: -reexported_symbols_list

clang: error: linker command failed with exit code 1 (use -v to see invocation)

È stato utile?

Soluzione

I've been struggling for days with the same problem, but eventually got it compiled. Before running the build script, try setting the following environment variables:

export TRIPLE=-apple-
export MACOSX_DEPLOYMENT_TARGET=10.6
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top