This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: c++ question
- From: 520075708323-0001 at t-online dot de (Alexander Helm)
- To: John Burski <jburski at cloudnet dot com>
- Cc: SCALUG <scalug-list at mn-linux dot org>, gcc-help at gcc dot gnu dot org
- Date: Wed, 25 Dec 2002 21:30:36 +0100
- Subject: Re: c++ question
- References: <3E0969FD.7090405@cloudnet.com>
Hi John,
John Burski wrote:
[...]
// File: hello.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World\n";
}
[...]
If you add the above line everything should do fine (alternativly you
can use std::cout instead of cout)
[...]
INCLUDE = /usr/include/g++-3
LIBES = -lstdc++-3-libc6.2-2-2.10.0
hello: hello.o
g++ -o hello hello.o $(LIBES)
hello.o: hello.cpp
g++ -c -I$(INCLUDE) hello.cpp
I would urge you not to include system-libraries this way, it makes your
source less portable.
CU
Alexander