- 论坛徽章:
- 0
|
系统:
> /bin/arch
sun4
>/bin/uname -r
5.8
使用别人已经做好的编译选项时出现以下错误:
CC -xM1 -xarch=v9 -staticlib=Cstd -g -DSUN64 -D__SOLARIS__ -I/usr/local64/include -I/appls/tools/gtk-1.2 -I/appls/tools/glib-1.2 -c var.cpp
编译错误:
"/usr/include/wchar.h", line 21: Error: Multiple declaration for std::tm.
"/usr/include/time.h", line 30: Error: Multiple declaration for std::tm.
"/opt/SUNWspro/prod/include/CC/Cstd/rw/locimpl", line 243: Error: Cannot return void* from a function that should return __rwstd::facet_imp*.
"/opt/SUNWspro/prod/include/CC/Cstd/rw/vendor", line 59: Error: Could not find a match for std::ctype<char>::ctype(void*, bool, int).
而我用自己做的Makefile则可以顺利通过:
g++ -Wall -g -D__DEBUG__ -D__SOLARIS__ -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/openwin/include
-c var.cpp -o var.o
关键是上面那些定义或则函数我在程序中都没有用到过!难道Solaris的CC需要包含其它一些特定的头文件或者库?搞得特郁闷!谢谢 |
|