文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux 跨版本问题

linux 跨版本问题

时间:2010-08-27  来源:evander

 1 //redhattest.c
2 #include <stdio.h>
3 int main()
4 {
5 int a=0;
6
7 printf ("this is compiled in Red Hat, %d\n",a);
8
9 return 0;
10 }
11

 

gcc -o RadHatTest redhattest.c

编译完之后放到centos上运行可以正常运行

Red Hat版本信息
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
Kernel \r on an \m

Linux version 2.4.21-32.EL ([email protected]) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)) #1 Fri Apr 15 21:17:56 EDT 2005
2.4.21-32.EL
gcc版本信息
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 1 //centostest.c
2 #include <stdio.h>
3 int main()
4 {
5 int a=0;
6
7 printf ("this is compiled in Centos, %d\n",a);
8
9 return 0;
10 }
11
gcc -o CentosTest centostest.c
编译完之后放到red hat上运行得到"浮点数例外"的错误信息
centos 版本信息

CentOS release 5.5 (Final)
Kernel \r on an \m

Linux version 2.4.21-32.EL ([email protected]) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)) #1 Fri Apr 15 21:17:56 EDT 2005

2.6.18-194.8.1.el5
gcc版本信息

gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载