关于Undefined symbols for architecture x86_64这个错的总结
最近在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这个错的总结相关推荐
- mac编译openresty报Undefined symbols for architecture x86_64
./configure --prefix=/usr/local/openresty --with-luajit --with-http_sub_module --add-module=../ngx_h ...
- clion在使用sqlite3的时候,显示Undefined symbols for architecture x86_64错误的解决办法
显示Undefined symbols for architecture x86_64错误的原因 1.缺少静态库 环境:在模拟器上报错但在真机上能运行成功,而且报的错误来自于第三方库. 原因:arch ...
- 经典错误:symbol(s) not found for architecture x86_64 || Undefined symbols for architecture x86_64:
记录经典,防止踩坑!!!!! 真机可以运行,模拟器报错. 错误信息显示如下: Ld /Users/lyj/Library/Developer/Xcode/DerivedData/MYPayBucket ...
- Undefined symbols for architecture x86_64: mac+vscode问题汇总
问题1:私自添加万能头文件后,无法检测,甚至不能直接在列表新建cpp文件,必须要重命名一变,或者⌘+n新建才能解决.不然就报错: Undefined symbols for architecture ...
- Undefined symbols for architecture x86_64
描述 使用glog的CMake工程,在make时报错 出现原因 之前也出现过Undefined symbols for architecture x86_64这种错误,出现这种错误时,基本上问题可以确 ...
- (OS X) OpenCV架构x86_64的未定义符号:错误(OpenCV Undefined symbols for architecture x86_64: error)...
原地址: http://www.it1352.com/474798.html 错误提示如下: Undefined symbols for architecture x86_64:"cv::_ ...
- Undefined symbols for architecture x86_64: in mac OS
1.我当前使用的mac OS系统版本: macOS Mojave Version 10.14.6 2.Command Line Tools: Xcode Version 11.3.1 (11C504) ...
- MAC 下用GCC编译报错:“Undefined symbols for architecture x86_64: ”
解决方法: 因为GCC编译的时候没有链接C++ standard library, 因此在编译的时候要加入符号 -lstdc++ 使用命令: gcc myprog.c -o myprog -lstdc ...
- osX下编译c++程序出现Undefined symbols for architecture x86_64的原因及解决
摘自stackoverflow.com 1.The error isn't that it's the wrong architecture, it's that std::cout (and oth ...
最新文章
- 遮挡人脸检测--Detecting Masked Faces in the Wild with LLE-CNNs
- Grunt插件之LiveReload 实现页面自动刷新,所见即所得编辑
- [转载]使用RoboCopy 命令
- jodd-StringTemplateParser使用
- c#开发-基础知识及有用技巧(一)
- VC6启用运行时类型识别 (RTTI)
- [vue] 移动端ui你用的是哪个ui库?有遇到过什么问题吗?
- python画饼图程序_python使用matplotlib画饼状图
- HttpHandler:给指定路径下的图片添加水印显示
- 读取图像矩阵维度必须一致_深度学习在放射治疗中的应用——工具篇(二)矩阵基本操作...
- 图像处理(1)----入门教程
- 《庆余年》全集资源遭盗播,腾讯、爱奇艺、剧方联合回应...
- 【Android】Android SDK下载和更新失败的解决方法!!!
- struct与class的区别
- 微软亚洲研究院:NLP将迎来黄金十年
- HoRNet SongKey MKIII Mac - 实时调性和弦检测
- firefox flash问题
- python抢票_Python自动抢票神器,GitHub热榜第一!
- php多图片上传插件
- 读H.265/HEVC编码笔记(一)