install problem about gcc3.0

chaisave 2002-03-08 02:07:49
我在cygwin 1.3.10上安装gcc3.0.4 和 libstdc++-v3,
安装成功了
$gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/specs
Configured with: ../gcc-3.0.40/configure --verbose --enable-threads=win32 --with
-system-zlib --disable-nls --disable-shared --enable-static --with-gnu-as --with
-gnu-ld --program-prefix=gcc --enable-languages=c,c++ --disable-libgcj --disable
-checking --enable-sjlj-exceptions --host=i686-pc-cygwin --enable-haifa --with-g
nu-ld --with-gnu-as
Thread model: win32
但是,在我编译一个简单的hello world *c++* (using cout stream)程序时,会出一堆垃圾:
$g++ hello.cc
/cygdrive/h/DOCUME~1/Save/LOCALS~1/Temp/ccqDurRE.o(.text+0x1c):test.cc: undefined reference to `__gxx_personality_sj0'
/cygdrive/h/DOCUME~1/Save/LOCALS~1/Temp/ccqDurRE.o(.text+0xdf):test.cc: undefined reference to `std::cout'
我看了FAQ和一些newsgroup但还是不能解决问题(重装libstdc++-v3)。
有哪位大虾能施以援手,在下不胜感激!
...全文
108 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
x_zj 2002-03-09
  • 打赏
  • 举报
回复
the version 3.x of gcc changed the name mangled style,
and most lib cannot compatible with it!
x_zj 2002-03-08
  • 打赏
  • 举报
回复
同样对于/usr/include/g++-3v也链接到/usr/local/include/g++-3v
x_zj 2002-03-08
  • 打赏
  • 举报
回复
将/usr/local/lib下的 libiberty.a libstdc++.a libsupc++.a
链接到/usr/lib下.
ln -sf /usr/local/lib/xxxx.a xxxx.a
chaisave 2002-03-08
  • 打赏
  • 举报
回复
it works.
thanks, but why "make" didn't do these for me, I doubt.

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧