This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ help
- From: Andrea 'Fyre Wyzard' Bocci <fwyzard at inwind dot it>
- To: Mark Jenkins <markj at gvrc dot com>,gcc-help at gcc dot gnu dot org
- Date: Sat, 18 May 2002 02:40:59 +0200
- Subject: Re: g++ help
At 14.39 14/05/2002 (GMT -0500), Mark Jenkins wrote:
>Hi,
>
>I am new to g++ and need help compiling a simple program.
>I have installed g++ on a unix, "sparc-sun-solaris2.7".
>
>Could some send me a sample make file and program, to
>complie a g++ program.
>
>Also what should the CXX and CXXFLAGS environment variables
>be set to?
>
>Trying to compile the following program:
>
>#include <iostream.h>
// you probably need to add here this line ...
using namespace std;
>int main()
>{
// and change this
// cout << "Hellow World!";
// to
cout << "Hello World!" << endl;
>return 0;
>}
...and then compile with
g++ fileame.cc -o filaname.
running the executable
./filename
should print
Hello World!
and exit (succesfully).
>Thanks,
>
>Mark Jenkins
HTH, fwyzard