LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1400|回复: 4

intel compiler编译问题,请教!

[复制链接]
发表于 2009-6-17 20:59:37 | 显示全部楼层 |阅读模式
新手入门问题,刚在fedora 11 x86-64装好intel compiler 10,测试一下icc,结果如下:
icc -o hello hello.c ------OK
icc -c hello.c
icc -o test hello.o -----error
/usr/lib/gcc/x86_64-redhat-linux/4.4.0/../../../../lib64/crt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/x86_64-redhat-linux/4.4.0/../../../../lib64/crt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'

貌似glibc连接问题,到底错了哪里?上面两个方式有什么区别
发表于 2009-6-17 21:53:20 | 显示全部楼层
加自己加上一些库吧,
-lxxx

libc_csu_???
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-6-18 12:02:02 | 显示全部楼层

re:intel compiler编译问题,请教!

但是使用gcc,上面到两个方式都没有问题.
回复 支持 反对

使用道具 举报

发表于 2009-7-3 19:31:50 | 显示全部楼层
1. hello.c是最简单的hello world吗?

2. 为什么icc编译链接的是gcc的库?
/usr/lib/[color="Red"]gcc/x86_64-redhat-linux/4.4.0/../../../../lib64/crt1.o: In function `_start':
回复 支持 反对

使用道具 举报

发表于 2009-7-3 19:32:30 | 显示全部楼层
icc编译出来的能跑吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表