This is the mail archive of the
mailing list for the libstdc++ project.
Re: gcc makefile hello world (iostream issue)
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: blessman11 <blessingta at hotmail dot co dot uk>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 20 Jun 2012 23:37:06 +0100
- Subject: Re: gcc makefile hello world (iostream issue)
- References: <email@example.com>
On 20 June 2012 23:04, blessman11 wrote:
> I'm trying to code hello world in GCC, but whilst I get my simple makefile
> correctly, the problem comes when I try to use <iostream> or even my own
> headerfiles defined outside the folder with my main .cpp file.
> so any help?
This question would be more appropriate on the gcc-help mailing list.
> How should I alter the makefile below to accommodate <iostream> or any
> header files out side my main.cpp file folder?
> [output]all: hello
> ? ? ? ?-std=c++11
> objects = hello.o
> edit: $(objects)
> ? ? ? ?cc -o edit $(objects)
cc is the C compiler, use g++ to compile C++
To find headers in other directories use the -I option.