gcc是GNU专属C/C++编译器,因为gcc存在着兼容性的问题,工作时必须用指定版本的gcc才能编译通过,因此我们应该适时的切换到相应的gcc编译器下进行工作。 1.简述: 一般情况下,编译程序都是使用的是:/usr/bin/gcc 其实这个/usr/bin/gcc只是个符号链接,它指向了/etc/alternatives/gcc,而/etc/alternatives/gcc是指向了/usr/bin/gcc-4.4, 我们可以使用ls命令查看: zyx@zyx:/$ ls /usr/bin/gcc -l lrwxrwxrwx 1 root root 21 20...
by meego2012 - Linux环境编程 - 2011-11-10 09:25:37 阅读(1839) 回复(0)
我的系统是ubuntu11.04,默认的是gcc4.5,我想安装gcc4.1.0(方便以后我制作交叉编译工具链),在网上找了很久,没有找到适合的,哪位有好的安装方法的教教我,感激不尽
现在机子是FC4,默认的gcc是4.0的, 我想安装3.4.4的,按gcc的manual中说的作,如下: $mkdir objdir $cd objdir $../gcc-3.4.4/configure --prefix=/usr/local/gcc-3.4.4 --enable-shared --enable-threads=posix ......... $make 然后就给我报错: checking whether compiler driver understands Ada... yes configure: error: unknown check category release make: *** [configure-gcc] 错误 1 是不是高版本不能编译安装低...
现在机子是FC4,默认的gcc是4.0的, 我想安装3.4.4的,按gcc的manual中说的作,如下: $mkdir objdir $cd objdir $../gcc-3.4.4/configure --prefix=/usr/local/gcc-3.4.4 --enable-shared --enable-threads=posix ......... $make 然后就给我报错: checking whether compiler driver understands Ada... yes configure: error: unknown check category release make: *** [configure-gcc] 错误 1 是不是高版本不能编译安装低...
In file included from /usr/include/stdio.h:34, from hello.c:2: /usr/lib/gcc/i686-linux-gnu/4.4.5/include/stddef.h:211: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’ In file included from /usr/include/stdio.h:75, from hello.c:2: /usr/include/libio.h:332: error: expected specifier-qualifier-list before ‘size_t’ /usr/include/l...
前两天开始动手,想弄个gcc4.4玩玩,在网上google了一下,首先急匆匆的把源码给弄下来了,用的是svn: svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc 首先找了个安装指南,地址在:http://gcc.gnu.org/install/ 下面描述我的安装过程(系统:ubuntu9.04 x86_64,现有gcc版本:系统自带的4.3.3版本) 按照上面的指南的步骤,扫了一眼prerequistes,直接跳过(或许这是造成后面麻烦的原因之一吧) 然后开始配置,首先...
在vmware里新装了个centos5.1
[root@vcentOS kernel]# uname -a
Linux vcentOS 2.6.18-53.1.14.el5xen #1 SMP Wed Mar 5 12:39:19 EST 2008 i686 i686 i386 GNU/Linux
默认装的gcc有:
[root@vcentOS kernel]# gcc
今天安装了最新版的ubuntu7。10,然后用gcc编个程序 #include "stdio.h" main() { printf(" hello linux !"); } 然后保存并命名为hello.c 然后执行命令: gcc hello hello.c 可是编译不出来 提示为 gcc: hello: No such file or directory Hello.c:1:19: error: stdio.h:No such file or directory Hello.c: In function 'main': Hello.c:4: warning: incompatible implicit declaration of built-in function 'printf' 我是新...
root@ygh-desktop:/usr/local/src/gcc-3.3.2# ./configure --prefix=/usr/local/gcc332 Configuring for a i686-pc-linux-gnulibc1 host. *** This configuration is not supported in the following subdirectories: target-libffi target-boehm-gc target-zlib target-libjava (Any other directories should still work fine.) Created "Makefile" in /usr/local/src/gcc-3.3.2 using "mt-frag" /usr/bin/ld:crt1.o:...