0
有沒有人用Xcode 4.2在C++(或C)項目上試過OpenMP?Xcode 4.2 OpenMP:鏈接器錯誤?
看起來,在項目設置中啓用OpenMP後,鏈接器被賦予正確的標誌(-fopenmp),但它不會鏈接。一個簡單的例子是這樣的:
Build target aaaa
Ld DerivedData/aaaa/Build/Products/Debug/aaaa normal x86_64
cd /Users/senseiwa/Desktop/aaaa/aaaa
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang++ -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.7.sdk
-L[...]/DerivedData/aaaa/Build/Products/Debug
-F[...]/DerivedData/aaaa/Build/Products/Debug
-filelist [...]/Objects-normal/x86_64/aaaa.LinkFileList
-mmacosx-version-min=10.7
-fopenmp
-o [...]/DerivedData/aaaa/Build/Products/Debug/aaaa
ld: library not found for -lgomp
Command /Developer/usr/bin/clang++ failed with exit code 1
現在,我真的不明白我在做什麼錯在這裏,因爲使OpenMP的先前版本就足夠了。
我錯過了什麼嗎?
看起來你是對的:鐺不是OpenMP友好的 – senseiwa