Post

Replies

Boosts

Views

Activity

Clang linking error MacOS Big Sur
Hi All, I am trying to build my helloworld.cpp, but I am having problem since I updated to Big Sur. Below a verbose screenshot of my build error message. Looks like it cannot link the c++ std library? I have already tried to remove the command line tool and re install it. No luck. Apple clang version 12.0.0 (clang-1200.0.32.27) Target: x86_64-apple-darwin20.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ignoring nonexistent directory "/usr/include/c++/v1" "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx11.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name helloworld.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=all -fno-strict-return -masm-verbose -munwind-tables -fcompatibility-qualified-id-block-type-checking -target-cpu penryn -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 609.6 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0 -stdlib=libc -internal-isystem /Library/Developer/CommandLineTools/usr/bin/../include/c/v1 -internal-isystem /usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include -internal-externc-isystem /usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -std=c17 -fdeprecated-macro -fdebug-compilation-dir /Users/***/Documents/CppProject -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=macosx-11.0.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/4t/my76lgkd0f7c34tybwg9f6km0000gn/T/helloworld-f9d8e9.o -x c /Users/***/Documents/CppProject/helloworld/helloworld.cpp clang -cc1 version 12.0.0 (clang-1200.0.32.27) default target x86_64-apple-darwin20.1.0 ignoring nonexistent directory "/usr/include" #include "..." search starts here: #include <...> search starts here: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1 /usr/local/include /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include /Library/Developer/CommandLineTools/usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -platform_version macos 11.0.0 0.0.0 -o /Users/***/Documents/CppProject/helloworld/helloworld /var/folders/4t/my76lgkd0f7c34tybwg9f6km0000gn/T/helloworld-f9d8e9.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.osx.a ld: library not found for -lc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) The terminal process "/bin/bash '-c', 'clang -std=c17 -stdlib=libc++ -g -v /Users/***/Documents/CppProject/helloworld/helloworld.cpp -o /Users/***/Documents/CppProject/helloworld/helloworld'" terminated with exit code: 1.
15
0
26k
Nov ’20