[问题]gcc问题
发表于 : 2007-10-12 18:46
安装gcc后 编辑hello.c文件完毕,在当前目录打开终端输入gcc hello.c -o hello
显示gcc: hello.c:No such file or directory
gcc: 没有输入文件
这是为什么?
显示gcc: hello.c:No such file or directory
gcc: 没有输入文件
这是为什么?
代码: 全选
#include<stdio.h>
代码: 全选
$ sudo apt-get install build-essential
1, 编程请用英文半角标点zccpop 写了:我用gcc正常
用g++编译c++文件有问题》?
build-essential 也安装了
问题:
hello.cpp:1: 错误: 程序中有游离的 ‘\357’
hello.cpp:1: 错误: 程序中有游离的 ‘\274’
hello.cpp:1: 错误: 程序中有游离的 ‘\203’
hello.cpp:1: 错误: expected constructor, destructor, or type conversion before ‘<’ token
hello.cpp: In function ‘int main()’:
hello.cpp:7: 错误: ‘cout’ 在此作用域中尚未声明
这两点我注意到的~BigSnake.NET 写了:1, 编程请用英文半角标点zccpop 写了:我用gcc正常
用g++编译c++文件有问题》?
build-essential 也安装了
问题:
hello.cpp:1: 错误: 程序中有游离的 ‘\357’
hello.cpp:1: 错误: 程序中有游离的 ‘\274’
hello.cpp:1: 错误: 程序中有游离的 ‘\203’
hello.cpp:1: 错误: expected constructor, destructor, or type conversion before ‘<’ token
hello.cpp: In function ‘int main()’:
hello.cpp:7: 错误: ‘cout’ 在此作用域中尚未声明
2, using namespace std;