That isn't a problem with a makefile. That's a problem with main.cpp. I might guess that you should try changing iostream.h to iostream but that's only a guess out of goodwill. This mailing list isn't for helping with C++ problems. I don't know where you can turn for help. Perhaps wherever you got main.cpp from.
________________________________ From: bug-make-bounces+mdorey=bluearc....@gnu.org <bug-make-bounces+mdorey=bluearc....@gnu.org> To: bug-make@gnu.org <bug-make@gnu.org> Sent: Sun Apr 11 05:46:17 2010 Subject: Bug Hello everybody, I have a problem with makefile. When I type make, the result is: ------------- tig...@tigran-laptop:~/Documents/MakeFile/sample$ make g++ main.cpp hello.cpp factorial.cpp -o hello main.cpp:1:22: error: iostream.h: No such file or directory main.cpp: In function ‘int main()’: main.cpp:6: error: ‘cout’ was not declared in this scope main.cpp:6: error: ‘endl’ was not declared in this scope hello.cpp:1:22: error: iostream.h: No such file or directory hello.cpp: In function ‘void print_hello()’: hello.cpp:5: error: ‘cout’ was not declared in this scope make: *** [all] Error 1 ------------- Could you help me. Thanks.
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make