0
我曾經可以編譯一個異步Hello World風格的程序,但升級到Yosemite/Xcode 6後,出現鏈接錯誤。如何調整我的編譯指令以成功鏈接到調度庫?調度鏈接錯誤
代碼:
https://github.com/mcandre/parhello/tree/master/objc
跟蹤:
$ make
mkdir -p bin/
clang -Wall -Wextra -Wmost -Weverything -framework Foundation -lobjc -fblocks -ldispatch -lBlocksRuntime -o bin/parhello ParHello.m
ld: library not found for -ldispatch
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/parhello] Error 1
系統:
$ specs clang xcode os
Specs:
specs 0.12
https://github.com/mcandre/specs#readme
clang --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
xcodebuild -version
Xcode 6.1
Build version 6A1052d
system_profiler SPSoftwareDataType | grep 'System Version'
System Version: OS X 10.10.1 (14B25)
事實上,儘管我正在開發Linux端口,我在那裏犯了一個錯誤。謝謝! – mcandre 2014-12-03 00:20:09