sr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
来源:互联网 发布:日韩男士帽子 知乎 编辑:程序博客网 时间:2024/05/20 20:21
自己写了一个简单的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!
0 0
- sr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- ../lib/crt1.o: In function `_start':
- /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o: In function `_start': (.text+0x18): undefined
- /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libmysqlclient.a(libmysql.c.o): In function
- 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'的错误
- /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
- linux下gcc In function `_start'
- [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动态库文件修复
- cuda程序编译出错: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5
- linux内核编译错误:lib/mpi/generic_mpih-mul1.o: In function `mpihelp_add_1':
- gcc位于/usr/lib/i686-linux-gnu目录下
- linux sys目录介绍
- Http总结
- select2 默认选中
- L3-003. 社交集群
- JNI官方规范中文版——如何把一个JVM嵌入到本地程序中
- sr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start'问题解决
- SQLite基础
- Unable to satisfy the following requirements解决方案
- 抽空写的网站抓图片c++,增加了简单的多线程和互斥
- JNI官方规范中文版——在程序中集成JVM需要注意的JNI特征
- hud 1548 A strange lift
- Android属性动画——实现布局的下拉展开
- 支持向量机 SVM 讲义(五)
- 介绍Json