Mac OS X 下命令行编译错误: ld: library not found for -lcrt1.10.6.o
来源:互联网 发布:python web 上传文件 编辑:程序博客网 时间:2024/06/14 14:57
在 Mac OS X 的 10.8.3 的版本中,使用命令行运行 configure 时,生成下面的错误:
WenBi-MacBook:tcpdump-4.4.0 wenbi$ ./configure
checking build system type... x86_64-apple-darwin12.3.0
checking host system type... x86_64-apple-darwin12.3.0
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/wenbi/Downloads/tcpdump-4.4.0':
configure: error: C compiler cannot create executables
See `config.log' for more details查看 config.log 文件的内容,会看到更详情的错误信息:
configure:2755: gcc conftest.c >&5
81 ld: library not found for -lcrt1.10.6.o
82 collect2: ld returned 1 exit status
83 configure:2759: $? = 1
84 configure:2797: result: no
85 configure: failed program was:
86 | /* confdefs.h */
87 | #define PACKAGE_NAME ""
88 | #define PACKAGE_TARNAME ""
89 | #define PACKAGE_VERSION ""
90 | #define PACKAGE_STRING ""
91 | #define PACKAGE_BUGREPORT ""
92 | #define PACKAGE_URL ""
93 | /* end confdefs.h. */
94 |
95 | int
96 | main ()
97 | {
98 |
99 | ;
100 | return 0;
101 | }
102 configure:2802: error: in `/Users/wenbi/Downloads/tcpdump-4.4.0':
103 configure:2804: error: C compiler cannot create executables上面用红色标注的信息,说明 gcc 编译器找不到 C 的运行时库。这是因为没有把 xocde 提供的头文件目录和库目录使用环境变量导出,在命令行中使用 gcc 时,找不到相应的标准头文件和库文件。
打开用户目录下的 .bash_profile 文件,添加如下内容:
export C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include
export LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib
export LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib
重新运行一个新的 bash 窗口,重新运行 configure/make/make install。
- Mac OS X 下命令行编译错误: ld: library not found for -lcrt1.10.6.o
- 解决Xcode编译错误 ld: library not found for -lcrt1.3.1.o
- 解决X-code 编译错误:library not found for -lcrt1.3.1.o
- 解决X-code 编译错误:library not found for -lcrt1.3.1.o
- 解决X-code 编译错误:library not found for -lcrt1.3.1.o
- Xcode运行错误library not found for -lcrt1.3.1.o
- ios10测试版的真机在xcode8(beta)下编译报错 library not found for -lcrt1.3.1.o的解决办法
- 解决 Mac OS X 下 Nginx 编译报错 symbol(s) not found for architecture x86_64
- 解决 Mac OS X 下 openrestry 编译报错 symbol(s) not found for architecture x86_64
- X-Code 报错 ld: library not found for -lAFNetworking
- ld: library not found for -lXXXXX 编译问题的解决方法
- ld: library not found for -lXXXXX 编译问题的解决方法
- ld: library not found for -lgcc_s.10.5错误的解决
- Xcode - ld: library not found for -lPods -******* 错误
- 从ld: library not found for -lzookeeper_mt 看ZooKeeper 在Mac OS EI Capitan的安装方式
- mac下编译安装php7时报ld: symbol(s) not found for architecture x86_64的解决方法
- 关于xCode编译错误"ld: library not found for -*** linker command failed with exit code 1"的解决方法
- 在编译工程时,有时会遇到类似“ld: library not found for -l…” 的错误提示
- LINUX-C成长之路(五):控制流
- C语言拾遗(二):符号重载
- C语言的发展史-2
- 稀疏矩阵——创建和可视化
- 提高系统性能的方法简单总结
- Mac OS X 下命令行编译错误: ld: library not found for -lcrt1.10.6.o
- SDP协议介绍
- 图片的上传
- mmc/sd/sdio的区别
- arm驱动程序——点亮led-利用次设备号(韦东山的视频总结及针对linux-2.6.30)
- 使用 Jersey 和 Apache Tomcat 构建 RESTful Web 服务
- js控制div层的显示跟随滚动条滚动而滚动
- 在win7系统下硬盘安装centos6.3----快速安装
- jboss性能优化(一)