最简单的代码:
#include<iostream>
using namespace std;
int main()
{
cout<<"what'up,my wxia!\n";
return 0;
}
bash: a.out: command not found
g++ abc.cpp后a.out没法执行 怎么回事??
-
- 帖子: 4
- 注册时间: 2006-10-13 17:09
- fiftymetre
- 帖子: 37
- 注册时间: 2006-09-29 15:06
-
- 帖子: 3182
- 注册时间: 2006-03-10 15:10
- 来自: xi'an China
- 联系:
-
- 帖子: 7
- 注册时间: 2006-09-21 9:31
回复
楼主是怎样进行编译的阿,我用你的程序试了一下,结果怎么是这样阿,能帮我看看是什么地方出了问题吗
bear@bear-desktop:~$ g++ helloworld.cpp
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crt1.o: In function `_start':../sysdeps/i386/elf/start.S:115:对‘main’未定义的引用
collect2: ld 返回 1
最主要我想知道你们在什么地方编辑程序,然后在什么地方进行编译执行的,谢谢了
bear@bear-desktop:~$ g++ helloworld.cpp
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crt1.o: In function `_start':../sysdeps/i386/elf/start.S:115:对‘main’未定义的引用
collect2: ld 返回 1
最主要我想知道你们在什么地方编辑程序,然后在什么地方进行编译执行的,谢谢了