/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
来源:互联网 发布:并行复杂网络算法 用途 编辑:程序博客网 时间:2024/06/05 18:58
自己写了一个简单的hello.c
#include "stdio.h"
void
hello (const char * name)
{
printf ("Hello, %s!/n", name);
}
$gcc hello.c
就会出现/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'
:
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
解决方法:只要把hello函数名改为main就没错了! 最好主函数名为main
#include "stdio.h"
void
main (const char * name)
{
printf ("Hello, %s!/n", name);
}
$gcc hello.c
ok!
- /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- sr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o: In function `_start': (.text+0x18): undefined
- ../lib/crt1.o: In function `_start':
- /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libmysqlclient.a(libmysql.c.o): In function
- /usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid sym
- /usr/bin/ld: client: hidden symbol `__dso_handle' in /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbegin.o is
- [android]编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz错误信息
- [android]编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz错误信息
- hidden symbol `pthread_atfork' in /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a(pthread_atfork.oS
- /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8
- 误删/usr/lib/x86_64-linux-gnu动态库文件修复
- gcc 共享库的时候显示.../crt1.o: In function `_start': (.text+0x18): undefined reference to `main'的错误
- gcc/g++ 出现.../crt1.o: In function `_start': (.text+0x18): undefined reference to `main'的错误
- gcc位于/usr/lib/i686-linux-gnu目录下
- cuda程序编译出错: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5
- linux下gcc In function `_start'
- Linux出现sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/local/lib/libssl.so.1.0.0
- MTK 中的NVRAM读写操作指南
- CInternetSession的简单使用
- Python - windows - 隐藏和显示Windows 状态条
- Android多媒体学习十:利用AudioRecord类实现自己的音频录制程序
- Android 的SimpleAdapter几点认识
- /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- 红酒网项目上线出现BUG
- MTK开机流程 - MMI部分
- 软件优化技术
- 查询数据库的存在情况
- 用Asp隐藏文件路径实现防盗链
- 如何成为一个牛逼的C/C++程序员?
- 防止盗链下载的方法
- DirectX 9 SDK安装后在vs2005里编译BaseClasses出错