![]() |
Makefile
Hi, I need some help with writing makefile. I tried to build undermentioned code(in OS SOLARIS), but it doesnt work. Heads files are included many times in project, so i used ${HEAD} instead of writing each head file. Thanks for any help
Code:
///////////////////////////////////////////////////////////////////////*** Error code 127 make: Fatal error: Command failed for target `AI.o' jack@opensolaris:~/pisk$ make G++ -Wall -Wno-long-long -pedantic AI.cpp sh: line 1: G++: not found |
Re: Makefile
Are you sure that make file generated that error? CC is defined as g++, but the error is that G++ doesn't exist. Solaris is case sensitive, so the error suggests you're not using the makefile posted.
Does the G++ command work from the command line (also, does the same command work if you use g++ instead of G++)? Is the makefile you posted called Makefile (note the case) or something else? If something else then you need to specify the makefile name with -f (e.g. if it's called mymake.mk, the command is make -f mymake.mk). What command caused the Error code 127? |
Re: Makefile
Sorry, I copied bad error message, but the problem is the same. I tried to build it in various OS(solaris,kubuntu,knoppix), all from "live cd". I dont know why, but in knoppix OS is different error message. Makefile is named "Makefile".
//solaris + kubuntu// make: Fatal error: Command failed for target `AI.o' jack@opensolaris:~$ make g++ -Wall -Wno-long-long -pedantic AI.cpp sh: line 1: g++: not found *** Error code 127 //knoppix// g++ -Wall -Wno-long-long -pedantic AI.cpp /UNIONFS/usr/bin/../lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function `_start': ../sysdeps/i386/elf/start.S:115: undefined reference to `main' collect2: ld returned 1 exit status make: *** [AI.o] Error 1 |
| All times are GMT +5.5. The time now is 19:07. |