how to use compiler

软件和网站开发以及相关技术探讨
回复
LaoLiulaoliu
帖子: 131
注册时间: 2006-10-25 17:50
来自: 南京
联系:

how to use compiler

#1

帖子 LaoLiulaoliu » 2006-11-05 8:37

I write helloword.cpp and makefile at /c.
I 've already install the gcc and g++.
how to use the compiler to output my words.
helloword.cpp
#include <stdio.h>
#include <iostream>
using namespace std;
int main() {
printf("Hello \n");
cout<<"World!!\n";
}
makefile
all:helloworld
helloworld:helloworld.cpp
\tg++ -g -o \$@ helloworld.cpp
头像
efan
帖子: 238
注册时间: 2006-09-14 21:59
来自: 广东
联系:

#2

帖子 efan » 2006-11-05 18:51

啥意思?也不写有什么错误提示没~~~
我记得用make的话,不需要写makefile,一样可以用make helloword来编译。
另外,第一句的write应该用过去式,第二句的install应该用过去分词……
传说中的一凡……
LaoLiulaoliu
帖子: 131
注册时间: 2006-10-25 17:50
来自: 南京
联系:

#3

帖子 LaoLiulaoliu » 2006-11-06 17:48

我是在新手上路指南上看到的,它说是测试环境,还用了ech0 ' '
我不懂。
tick
帖子: 65
注册时间: 2005-08-24 17:50
来自: yunnan
联系:

#4

帖子 tick » 2006-11-08 22:42

最好能把错误提示贴出来
LaoLiulaoliu
帖子: 131
注册时间: 2006-10-25 17:50
来自: 南京
联系:

#5

帖子 LaoLiulaoliu » 2006-11-09 21:16

我意思是我写了一个程序,在VC下直接编译,连接就行了
但是在ubuntu下不会
damnya
帖子: 1
注册时间: 2006-11-11 18:52

#6

帖子 damnya » 2006-11-11 20:01

echo是为了把代码输出到某个文件,``不是'',是键盘1左边那个~键
LaoLiulaoliu
帖子: 131
注册时间: 2006-10-25 17:50
来自: 南京
联系:

thank you

#7

帖子 LaoLiulaoliu » 2006-11-11 21:28

I understand your meaning.
回复