*大家看看 hp g++ 编译出错 打印hello world的程序*解决办法

********大家看看 hp g++ 编译出错 打印hello world的程序********
在hp下装了g++   编译报的错
At   least   one   PA   2.0   object   file   (/usr/local/pa20_32/lib/libstdc++.a(globals_io.o))   was   detected.   The   linked   output   may   not   run   on   a   PA   1.x   system.
/usr/ccs/bin/ld:   Unrecognized   argument:   +init
/usr/ccs/bin/ld:   Usage:     /usr/ccs/bin/ld   [options]   [flags]   files

#include   <iostream>    
using   namespace   std;    

int   main()
{
                cout   < <   "hello   world " < <   endl;    
                return   0;

}
大家帮帮忙,分不够再加。。

------解决方案--------------------
g++的 lib 路径设置的不正确

系统找到的是 libstdc++.a静态库

在PATH中 把G++的lib路径设置清楚,搜索的时候先搜索G++的lib库。


HP-Unix 是不是有 aCC ?
标准C++库为libstdc++.a

你查查看
------解决方案--------------------
hp下是不用这一句的.
去掉他,
using namespace std;