On 06/21/2012 05:14 PM, blessman11 wrote:
hi 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? 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) $(objects) : hello.h hello.o : hello.h .PHONY : clean clean : -rm edit $(objects)[/output]
iostream and .cpp look like C++ to me, but you are trying to use C compiler. You need to use g++ or c++ instead of cc in the edit ...
I don't know if something is wrong with my client or mailing list, but how is it possible to automatically set reply address to gcc-help address instead of sender one?