g++ help

Andrea 'Fyre Wyzard' Bocci fwyzard@inwind.it
Fri May 17 17:38:00 GMT 2002


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



More information about the Gcc-help mailing list