首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >clang:错误:未知参数:来自macos上libtool的'-n‘

clang:错误:未知参数:来自macos上libtool的'-n‘
EN

Stack Overflow用户
提问于 2018-02-28 21:10:53
回答 1查看 348关注 0票数 0
代码语言:javascript
复制
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am                                                                          
/bin/sh ./libtool  --tag=CXX   --mode=link /Applications/Xcode.app/Contents/Developer/usr/bin/g++  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Users/unhammer/src/macdivvun-service/Dependencies
/Static/x86_64/include -fvisibility=hidden -std=c++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/lib -o hfst-ospell main.o lib
hfstospell.la -n  -L/usr/local/lib -licui18n -licuuc -licudata                                                                           
libtool: link: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/include -fvisi
bility=hidden -std=c++1z -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -o hfst-ospell main.o -n -Wl,-bind_at_load  -L/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/lib ./.libs/lib
hfstospell.a -L/usr/local/lib -licui18n -licuuc -licudata                                                                                
clang: error: unknown argument: '-n'                                                                                                     
make[1]: *** [hfst-ospell] Error 1                                                                                                       
make: *** [all] Error 2      

这个-n是从哪里来的?我怎么才能知道呢?我使用的是xcodebuild,但是xcodebuild -showBuildSettings -scheme Dependencies|grep -e -n没有提供任何东西,而且在实际的(autotools)项目中,我在Makefile.am或configure.ac的任何标志中都没有看到-n

EN

回答 1

Stack Overflow用户

发布于 2018-02-28 21:10:53

我从$(AM_V_CXXLD)$(hfst_ospell_LINK) $(hfst_ospell_OBJECTS) $(hfst_ospell_LDADD) $(LIBS)行开始,查看了在生成的Makefile中构建的实际目标,并递归地手动检查了那里的所有变量。最后,我看到LIBS-n -L/usr/local/lib -licui18n -licuuc -licudataLIBSMakefile.in中的LIBS = @LIBS@,所以由configure.ac设置,它运行icu-config --ldflags来设置它。

由于某些原因,我给了-n -L/usr/local/lib -licui18n -licuuc -licudata而不是-L/usr/local/lib -licui18n -licuuc -licudataicu-config --ldflags版本(57.1)。升级icu解决了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49030409

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档