how to use compiler
发表于 : 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
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