- 论坛徽章:
- 0
|
我在http://www.sunfreeware.com/indexsparc10.html下载了gcc-3.4.6-sol10-sparc-local.gz,并用pkgadd安装成功。
这是安装后的gcc -v信息:
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
但我使用gcc来编译cpp文件时,出现了大量错误,如下(节选,完整错误log请看附件)
In file included from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/sparc-sun-solaris2.10/bits/c++locale.h:41,
from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/iosfwd:46,
from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/ios:44,
from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/ostream:45,
from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/iostream:45,
from tst.cpp:1:
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/clocale:49:20: locale.h: No such file or directory
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:79: error: `::memcpy' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:80: error: `::memmove' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:81: error: `::strcpy' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:82: error: `::strncpy' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:83: error: `::strcat' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:84: error: `::strncat' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:85: error: `::memcmp' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:86: error: `::strcmp' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:87: error: `::strcoll' has not been declared
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/cstring:88: error: `::strncmp' has not been declared
err.tar
(120 KB, 下载次数: 24)
注意该log中,tst.cpp是我编译的文件名,其line 1是:#include <iostream>
我用的命令是 gcc -o test tst.cpp |
|