ubuntu10.04 用gcc编译总是报这个错误
/usr/bin/ld: 1: Syntax error: ")" unexpected
collect2: ld returned 2 exit status
gcc 1.c
代码:
#include
by storm_7 - C/C++ - 2011-06-01 16:38:09 阅读(3871) 回复(12)
装好了gcc后,连个简单的Helloworld 都编译不了。 错误如下 bash-3.00# g++ main.cpp Assembler: "", line 1 : Illegal flag (-) bash-3.00# 这事怎么回事呀!是不是少装了什么东西呀?
装好了gcc后,连个简单的Helloworld 都编译不了。\r\n错误如下\r\n\r\nbash-3.00# g++ main.cpp\r\nAssembler:\r\n \"\", line 1 : Illegal flag (-)\r\nbash-3.00#\r\n这事怎么回事呀!是不是少装了什么东西呀?
typedef unsigned long long u64; #define VAR (3 * 1024 * 1024 * 1024) // 3GB base u64 base = VAR; gcc 4.6.3编译警告: integer overflow in expression 其实VAR并没有超出int的表达范围, 这里定义的是u64, 更不可能overflow 若定义成: #define VAR 0xc0000000 则编译没有任何警告! why?
建立交叉编译环境gcc时 输入make 出现如下错误 gcc: ../../build-i686-pc-linux-gnu/libiberty/libiberty.a:没有那个文件或目录 make[2]: *** [build/genmodes] 错误 1 make[2]: Leaving directory `/mnt/gcc' make[1]: *** [all-gcc] 错误 2 make[1]: Leaving directory `/mnt' make: *** [all] 错误 2 请问这个是怎么回事?
[code]#include
请教这个错误是什么意思,什么办法解决 [root@localhost code]# gcc -o 1.c -i ./ourhdr.h gcc: compilation of header file requested
gcc -g -Wall -c -o dnstop.o dnstop.c In file included from dnstop.c:10: /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:27:26: sys/isa_defs.h: No such file or directory /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:28:31: sys/feature_tests.h: No such file or directory /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:33:27: sys/ma...
gcc -g -Wall -c -o dnstop.o dnstop.c\r\nIn file included from dnstop.c:10:\r\n/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:27:26: sys/isa_defs.h: No such file or directory\r\n/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:28:31: sys/feature_tests.h: No such file or directory\r\n/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h:3...