2014-09-21 2 views
-1

clang ++ 및 g ++ 모두에서 코드 블럭 13.12가 C++ 11을 올바르게 컴파일하지 못하는 것 같습니다. clang ++로 컴파일 할 때 -std = C++ 11 및 -stdlib = libC++을 첨부했습니다. 이로 인해 연결 오류가 발생합니다. g ++의 경우 -std = C++ 11 또는 -std = C++ 0x를 추가하면 컴파일러에서 임의 헤더를 찾을 수 없습니다. clang ++와 g ++를 모두 사용하여 터미널에서 코드를 수동으로 컴파일했을 때 이러한 오류가 발생하지 않았습니다.코드 블록의 C++ 11 컴파일 문제

전체 링커 오류가 너무 길기 때문에 -v 호출에서 제공된 정보를 게시합니다.

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 
"/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o bin/Release/p_class_test obj/Release/Thread_Pool/thread_helper.o obj/Release/Thread_Pool/thread_pool.o obj/Release/Desktop/kmap_testing/hash_methods.o obj/Release/Desktop/p_class_test/p_classtest.o obj/Release/Desktop/p_class_test/refmanager.o -lstdc++ -lSystem /usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a 

가 = C++ 11 -stdlib = libc의 ++ -std와 ++ 연타를 사용하여 단말기에서 컴파일 :

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name thread_helper.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool/ -I /Users/zacharykraus/Desktop/kmap_testing/ -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/thread_helper-57c077.o -x c++ /Users/zacharykraus/Thread_Pool/thread_helper.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/bin/../lib/c++/v1 
/usr/local/include 
/usr/bin/../lib/clang/5.1/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name thread_pool.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool/ -I /Users/zacharykraus/Desktop/kmap_testing/ -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/thread_pool-321d19.o -x c++ /Users/zacharykraus/Thread_Pool/thread_pool.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/bin/../lib/c++/v1 
/usr/local/include 
/usr/bin/../lib/clang/5.1/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name hash_methods.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool/ -I /Users/zacharykraus/Desktop/kmap_testing/ -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/hash_methods-b28b1b.o -x c++ /Users/zacharykraus/Desktop/kmap_testing/hash_methods.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/bin/../lib/c++/v1 
/usr/local/include 
/usr/bin/../lib/clang/5.1/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name p_classtest.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool/ -I /Users/zacharykraus/Desktop/kmap_testing/ -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/p_classtest-ad56a5.o -x c++ /Users/zacharykraus/Desktop/p_class_test/p_classtest.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/bin/../lib/c++/v1 
/usr/local/include 
/usr/bin/../lib/clang/5.1/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name refmanager.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool/ -I /Users/zacharykraus/Desktop/kmap_testing/ -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/refmanager-d17474.o -x c++ /Users/zacharykraus/Desktop/p_class_test/refmanager.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/bin/../lib/c++/v1 
/usr/local/include 
/usr/bin/../lib/clang/5.1/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 
"/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o nork /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/thread_helper-57c077.o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/thread_pool-321d19.o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/hash_methods-b28b1b.o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/p_classtest-ad56a5.o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T/refmanager-d17474.o -lc++ -lSystem /usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a 
-std = C++ 11 -stdlib = libc의 ++와 ++ 연타하여 codeblocks에서

불행히도 나는 터미널에서 코드 블럭 g ++와 g ++를 비교할 수 없다.

그러나 clang의 두 가지 다른 컴파일 결과를 기반으로합니다. 링크 단계에서 codeblocks가 libC++ 라이브러리를 사용하지 않는 것처럼 보입니다. clang ++에 대한 링크에 올바른 라이브러리를 사용하도록 코드 블록을 얻으려면 어떻게해야합니까?

나는 clang 문제를 기반으로합니다. g ++에서 codeblocks는 C++ 11로 전환하도록 컴파일러에게 알리는 경우에도 구형 C++ 03 라이브러리를 사용합니다. 하지만 불행히도 나는 이것을 어떻게 확인 해야할지 모른다.

+1

당신은 문제의 링커 오류 (또는 그 샘플)을 제공해야한다. 관련이있을 수 있음 : [코드 블록 13.12를 사용할 때 일부 C++ 11 기능이 없습니다.] (http://stackoverflow.com/questions/21075852/some-c11-features-missing-when-using-code-blocks-13-12- mingw-4-8-1 및 sfml-2). C++ 11은 Eclipse 문제도 제공합니다. 일이 제대로 작동하려면 깨지기 쉽습니다. – jww

+0

@jww 감사합니다. 오류 메시지를 추가 했으므로 이제는 문제의 본질을 더 잘 이해할 수 있지만 문제를 해결할 방법이 없습니다. 내가 그 게시물을 체크 아웃하고 우리가 다른 문제가 있다고 생각합니다. 그러나 나는 100 % 확실하지 않다. –

+0

@jww 귀하의 조언과 정신을 불어 넣어 해결책을 찾았습니다. –

답변

1

나는 clang ++에 대한 답을 찾았습니다.

분명히 -stdlib = libC++를 컴파일러 플래그와 연결 플래그로 추가해야합니다.

링키지 출력 명확 올바른 라이브러리 사용되고 도시

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 
"/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o bin/Release/p_class_test obj/Release/Thread_Pool/thread_helper.o obj/Release/Thread_Pool/thread_pool.o obj/Release/Desktop/kmap_testing/hash_methods.o obj/Release/Desktop/p_class_test/p_classtest.o obj/Release/Desktop/p_class_test/refmanager.o -lc++ -lSystem /usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a 

으로 변.

g ++ 문제는 codeblocks가 실제로 컴파일 및 연결 프로세스의 일부로 clang ++ 라이브러리를 사용하여 g ++로 컴파일하므로 출력되기 때문에 g ++ 문제가 발생합니다. 비록 출력을 기반으로하더라도 g ++ 컴파일러와 include가 호출되는 지 100 % 명확하지 않습니다. 문제를 해결하려면 컴파일과 링크 모두에 -stdlib = libC++ 플래그를 추가해야합니다. apple에서 codeblocks가 실제로 후드 아래에서 clang 라이브러리를 사용하고 있다는 증거로서, 나는 링크와 컴파일 중 codeblocks에서 사용하는 명령을 -v에서 첨부했습니다. 여기

는 연결에 대한 정보입니다 :

g++ -o bin/Debug/p_class_test obj/Debug/Thread_Pool/thread_helper.o obj/Debug/Thread_Pool/thread_pool.o obj/Debug/Desktop/kmap_testing/hash_methods.o obj/Debug/Desktop/p_class_test/p_classtest.o obj/Debug/Desktop/p_class_test/refmanager.o -v -stdlib=libc++ 
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o bin/Debug/p_class_test obj/Debug/Thread_Pool/thread_helper.o obj/Debug/Thread_Pool/thread_pool.o obj/Debug/Desktop/kmap_testing/hash_methods.o obj/Debug/Desktop/p_class_test/p_classtest.o obj/Debug/Desktop/p_class_test/refmanager.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a 

을 그리고 여기에 컴파일에 대한 정보입니다 :

g++ -g -std=c++11 -stdlib=libc++ -v -I/Users/zacharykraus/Desktop/p_class_test/ -I/Users/zacharykraus/Thread_Pool -I/Users/zacharykraus/Desktop/kmap_testing -c /Users/zacharykraus/Desktop/p_class_test/refmanager.cpp -o obj/Debug/Desktop/p_class_test/refmanager.o 
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name refmanager.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -gdwarf-2 -coverage-file /Users/zacharykraus/Desktop/p_class_test/obj/Debug/Desktop/p_class_test/refmanager.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1 -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool -I /Users/zacharykraus/Desktop/kmap_testing -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zacharykraus/Desktop/p_class_test -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-slp -o obj/Debug/Desktop/p_class_test/refmanager.o -x c++ /Users/zacharykraus/Desktop/p_class_test/refmanager.cpp 
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin12.5.0 
ignoring nonexistent directory "/usr/include/c++/v1" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1 
/usr/local/include 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include 
/usr/include 
/System/Library/Frameworks (framework directory) 
/Library/Frameworks (framework directory) 
End of search list. 

++ g에 문제가 codeblocks에 무슨 드디어 알아 냈 짜증을 많이 후 . 문제는 g ++을 호출 할 때 codeblocks가 실행 경로를 사용하지 않는다는 것입니다. 대신 컴파일러 설정에서 toolchain 실행 경로를 사용합니다. 내 toolchain 실행 경로가 g ++의 사과 버전이있는/usr/bin으로 설정되었습니다. 이 버전은 실제로 복잡한 일련의 호출을 통해 clang ++을 호출합니다. 이 문제를 해결하기 위해 필자가해야 할 일은 toolchain 실행 경로를 실제 gnu 컴파일러가있는/usr/local/bin으로 변경하는 것이 었습니다. 이 변경 후, 나는 -stdlib = libC++을 제거 할 수 있었고 컴파일과 링크 정보는 아래에있다.

편집 :

g++ -g -std=c++11 -v -I/Users/zacharykraus/Desktop/p_class_test/ -I/Users/zacharykraus/Thread_Pool -I/Users/zacharykraus/Desktop/kmap_testing -c /Users/zacharykraus/Thread_Pool/thread_helper.cpp -o obj/Debug/Thread_Pool/thread_helper.o 
Using built-in specs. 
COLLECT_GCC=g++ 
Target: x86_64-apple-darwin12.5.0 
Configured with: ../gcc-4.8.1/configure --enable-languages=c++,fortran 
Thread model: posix 
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.5' '-g' '-std=c++11' '-v' '-I' '/Users/zacharykraus/Desktop/p_class_test/' '-I' '/Users/zacharykraus/Thread_Pool' '-I' '/Users/zacharykraus/Desktop/kmap_testing' '-c' '-o' 'obj/Debug/Thread_Pool/thread_helper.o' '-shared-libgcc' '-mtune=core2' 
/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/cc1plus -quiet -v -I /Users/zacharykraus/Desktop/p_class_test/ -I /Users/zacharykraus/Thread_Pool -I /Users/zacharykraus/Desktop/kmap_testing -D__DYNAMIC__ /Users/zacharykraus/Thread_Pool/thread_helper.cpp -fPIC -feliminate-unused-debug-symbols -quiet -dumpbase thread_helper.cpp -mmacosx-version-min=10.8.5 -mtune=core2 -auxbase-strip obj/Debug/Thread_Pool/thread_helper.o -g -std=c++11 -version -o /var/folders/k5/ywc_m0js3z3byh3yqwbfmfj00000gn/T//ccVidneY.s 
GNU C++ (GCC) version 4.8.1 (x86_64-apple-darwin12.5.0) 
    compiled by GNU C version 4.8.1, GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8.1 
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 
ignoring nonexistent directory "/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../../../x86_64-apple-darwin12.5.0/include" 
#include "..." search starts here: 
#include <...> search starts here: 
/Users/zacharykraus/Desktop/p_class_test/ 
/Users/zacharykraus/Thread_Pool 
/Users/zacharykraus/Desktop/kmap_testing 
/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../../../include/c++/4.8.1 
/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../../../include/c++/4.8.1/x86_64-apple-darwin12.5.0 
/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../../../include/c++/4.8.1/backward 
/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/include 
/usr/local/include 
/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/include-fixed 
/usr/include 
/System/Library/Frameworks 
/Library/Frameworks 
End of search list. 

연결 :

g++ -o bin/Debug/p_class_test obj/Debug/Thread_Pool/thread_helper.o obj/Debug/Thread_Pool/thread_pool.o obj/Debug/Desktop/kmap_testing/hash_methods.o obj/Debug/Desktop/p_class_test/p_classtest.o obj/Debug/Desktop/p_class_test/refmanager.o -v 
Using built-in specs. 
COLLECT_GCC=g++ 
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/lto-wrapper 
Target: x86_64-apple-darwin12.5.0 
Configured with: ../gcc-4.8.1/configure --enable-languages=c++,fortran 
Thread model: posix 
gcc version 4.8.1 (GCC) 
COMPILER_PATH=/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/:/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/:/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/:/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/:/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/ 
LIBRARY_PATH=/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/:/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../../:/usr/lib/ 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.5' '-o' 'bin/Debug/p_class_test' '-v' '-shared-libgcc' '-mtune=core2' 
/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/collect2 -dynamic -arch x86_64 -macosx_version_min 10.8.5 -weak_reference_mismatches non-weak -o bin/Debug/p_class_test -L/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1 -L/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../.. obj/Debug/Thread_Pool/thread_helper.o obj/Debug/Thread_Pool/thread_pool.o obj/Debug/Desktop/kmap_testing/hash_methods.o obj/Debug/Desktop/p_class_test/p_classtest.o obj/Debug/Desktop/p_class_test/refmanager.o -lstdc++ -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v 
collect2 version 4.8.1 
/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.8.5 -weak_reference_mismatches non-weak -o bin/Debug/p_class_test -L/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1 -L/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/../../.. obj/Debug/Thread_Pool/thread_helper.o obj/Debug/Thread_Pool/thread_pool.o obj/Debug/Desktop/kmap_testing/hash_methods.o obj/Debug/Desktop/p_class_test/p_classtest.o obj/Debug/Desktop/p_class_test/refmanager.o -lstdc++ -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v 
@(#)PROGRAM:ld PROJECT:ld64-236.4 
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 armv6m armv7m armv7em 
Library search paths: 
    /usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1 
    /usr/local/lib 
    /usr/lib 
    /usr/local/lib 
Framework search paths: 
    /Library/Frameworks/ 
    /System/Library/Frameworks/ 
+0

g ++에 대한 위의 호출이 마침내 무엇인지 알아 냈습니다. 그들은 xcode 호출을 사용하여 clang ++ 컴파일러를 호출합니다. 여기에는 clang의 includes 및 해당 라이브러리가 포함됩니다. –