Closed willccoates closed 10 years ago
so far i just have all: g++ -Wall -Werror -ansi -pedantic main.cpp -o ./bin/rshell rshell: g++ -Wall -Werror -ansi -pedantic main.cpp -o ./bin/rshell
in your all, you're supposed to call rshell. so all should look like all: rshell
other than that, everything looks fine!
so get ride of the statement inside of all? and also it says that the makefile needs to be in the root folder what exactly does this mean?
yep! and hmm i'm not too sure, but i think the makefile needs to be in your rshell folder. also, instead of main.cpp it should be src/main.cpp, since that's where your main.cpp file should be. that might fix the problem!
so we need a src file and a rshell folder, is the src folder in the rshell folder? and in the src goes main.cpp and in the rshell goes the license, Makefile, and readme right? thank you very much for your help
i have it set up so it is
rshell: inside rshell is src,Makefile, README.md, and license
src: main.cpp
when i run make from rshell i get the error
"make: *\ No rule to make target rhsell', needed by
all'. Stop."
with my makefile being
1 all: rhsell
2 rshell:
3 g++ -Wall -Werror -ansi -pedantic src/main.cpp -o ./bin/rshell
i fixed the error on line 1 also and still get the error
By you fixing the error on line 1 are you saying you fixed the rshell spelling error? If not, fix that, and see if it works.
i created a bin folder and it only ran when i typed -make rshell -bin/rshell i know that i need to only type make tho, any ideas on what to change in my makefile?
Otherwise your main file looks fine to me, and it might be a problem with your set-up.
yes i fixed the typo, but it still does not work unless i type make rshell
i am so confused on what to do inside the makefile, i know its late but ive never made one before and ive looked at tutorials online and not found them very helpful