【发布时间】:2017-03-01 11:21:19
【问题描述】:
{链接器命令相关问题有很多可能重复的问题,我阅读了所有可以找到的问题,但没有一个对我有帮助,所以我发布了一个新问题。}
我的构建失败并显示以下链接器消息:
ld: library not found for -lboost_regex
clang: error: linker command failed with exit code 1 (use -v to see invocation).
虽然我提供了 boost-regex 静态库。
编辑:我在Build Phases->Link Binary With Library中添加了libboost_regex.a
XCode执行的Ld命令如下。
Ld /Applications/Adobe\ InDesign\ CC\ 2017/Plug-Ins/AdWrks-CC17.v1.1.InDesignPlugin/Versions/A/AdWrks-CC17.v1.1 normal x86_64
cd /Users/apple/SDKs/CS12SDK/build/mac/prj
export MACOSX_DEPLOYMENT_TARGET=10.11
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Applications/Adobe\ InDesign\ CC\ 2017/Plug-Ins -L../../../build/mac/release_cocoa64/packagefolder/contents/macos/libs -L/Users/apple/SDKs/CS12SDK/build/mac/prj/../../../.. -L/Users/apple/SDKs/CS12SDK/build/mac/prj/../../../source/sdksamples/AdWorks -F/Applications/Adobe\ InDesign\ CC\ 2017/Plug-Ins -F../../../build/mac/release_cocoa64/packagefolder/contents/macos -F../../../build/mac/release_cocoa64/packagefolder/contents/Frameworks -filelist /Users/apple/SDKs/CS12SDK/build/mac/prj/build/AdWrks-CC17.build/Default/Release_Cocoa64.build/Objects-normal/x86_64/AdWrks-CC17.v1.1.LinkFileList -install_name ./AdWrks-CC17.v1.1.InDesignPlugin/Versions/A/AdWrks-CC17.v1.1 -mmacosx-version-min=10.11 -dead_strip -no_dead_strip_inits_and_terms -Wl,-executable_path -Wl,../../../build/mac/Release_Cocoa64/packagefolder/contents/macos/ -stdlib=libc++ -lboost_regex-mt -lboost_regex-mt -lboost_regex -lcrypto.0.9.8 -lxerces-c-3.1 -lxerces-c.28 -lz.1.2.5 -framework InDesignModelAndUI -lxerces-c.28 -lboost_regex-mt -lPublicPlugIn -single_module -Xlinker -dependency_info -Xlinker /Users/apple/SDKs/CS12SDK/build/mac/prj/build/AdWrks-CC17.build/Default/Release_Cocoa64.build/Objects-normal/x86_64/AdWrks-CC17.v1.1_dependency_info.dat -o /Applications/Adobe\ InDesign\ CC\ 2017/Plug-Ins/AdWrks-CC17.v1.1.InDesignPlugin/Versions/A/AdWrks-CC17.v1.1
可能是什么原因?任何帮助将不胜感激。
【问题讨论】:
-
"虽然我提供了 boost-regex 静态库。"编辑您的问题,向我们展示您所说的“提供”它是什么意思。
标签: c++ xcode boost linker boost-regex