SCOUNIX怎么编译c++

来源:百度知道 编辑:UC知道 时间:2024/06/14 18:42:22
SCOUNIX如何编译c++程序呀?

我装的SCOUNIX只有CC和cc编译器
输入gcc,g++,gxx,xlC_r,GCC,G++都是not found

CC能编译c++程序,但对下段代码

---hello.C-----------
#include <iostream>
int main()
{
std::cout<<"hello,world"<<std::endl;
}

269$ CC -o df test.C
iostream: No such file or directory
cpp: line 1, Fatal error: Cannot open include file "iostream"
#include <iostream>
CC: cpp failure: 1
270$ g++
ksh: g++: not found
271$ gcc
ksh: gcc: not found
272$ gxx
ksh: gxx: not found
273$

编译不通过,如何解决呀?能安装个g++的编译器吗?在哪下载?如何安装?

恳请各位大侠帮忙解决一下。

#include <iostream>
修改为
#include <iostream.h>
感谢你的回答,但这治标不治本。namespace也不支持,vector等也不支持
我想要能正确编译C++,谢谢


#include <iostream>
修改为
#include <iostream.h>

确实,在SCOUNIX下进行C++编程是存在局限性的,原因是,只能使用SCO公司自己提供的C++编译器,即CC。但是,namespace和vector是标准C++的基本概念,只要是C++编译器,都应该支持的。在实际编程中需要找到对应的库文件、头文件来使用的。