关于Undefined symbols for architecture x86_64这个错的总结
来源:互联网 发布:2016年网络主播招聘 编辑:程序博客网 时间:2024/06/05 16:27
最近在Mac上做一个程序,需要调用动态链接库,出现两次Undefined symbols for architecture x86_64的错误,所以总结下。
第一个是:
Undefined symbols for architecture x86_64: "_iconv_open", referenced from:
_main in main.o "_iconv", referenced from: _main in main.o "_iconv_close", referenced from:
_main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我的编译环境是QT,出这个错的原因是没有链接iconv这个库,所以链接就可以了:QMAKE_LFLAGS += -liconv -freamework coreFoundation -framework VideoDecodeAcceleration -framework Quartzcore - framework
第二个是Undefined symbols for architecture x86_64: "_memalign", referenced from: main..........................
出这个错的原因是移植到Mac上之后 main里面调用了memalign,但是Mac上屏蔽了memalign。所以找到memalign函数所在的文件,添加到工程里编译链接。检查
是否屏蔽(解除屏蔽)就可以了
- 关于Undefined symbols for architecture x86_64这个错的总结
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- android studio快捷键集合
- Java 集合框架
- 如何看待Java中的Import ???
- nginx session 保持的一些历程
- 我与算法的缘分
- 关于Undefined symbols for architecture x86_64这个错的总结
- 高效工作的信息搜集及管理术
- Java环境变量设置
- qstring arg()使用
- 自顶向下、逐步求精的算法设计
- Oracle-锁表、解锁
- Sst25vf080b
- Webrtc Intro - NetEQ
- 《Java程序设计》实训每天一博文之第一天