mikeizbicki / ucr-cs100

open source software construction course
Other
485 stars 407 forks source link

Makefile Issues #27

Closed DanTheTingler closed 10 years ago

DanTheTingler commented 10 years ago

Hey everyone:

When I run my makefile with the make command, I get this error:

g++ -Wall -Werror -ansi src/main.cpp -o ./bin/rshell /usr/bin/ld: cannot open output file ./bin/rshell: No such file or directory collect2: error: ld returned 1 exit status make: *\ [rshell] Error 1 g++: error: unrecognized command line option ‘-strict’

This line right here is pretty much the bulk of my makefile: g++ -Wall -Werror -ansi -strict src/main.cpp -o ./bin/rshell

Any ideas? Thanks!

DanTheTingler commented 10 years ago

Okay I realized that I misread -strict from somewhere, and changed it to

g++ -Wall -Werror -ansi -pedantic src/main.cpp -o ./bin/rshell. However, I'm still getting the same errors above with my make file, with the exception of the script error.

DanTheTingler commented 10 years ago

Okay I finally fixed it, it was a silly error. Didn't have a bin folder.

mikeizbicki commented 10 years ago

Glad you fixed it. Antoine pointed out that the -strict flag was supposed to be -pedantic and issued a pull request changing it in the public repo. As a reminder, if you ever see typos like this anywhere in this repo, you'll get extra credit for issuing the changes. Same if you add useful clarification to anything.

DanTheTingler commented 10 years ago

So just to confirm, our makefile is supposed to make the bin folder and we're NOT supposed to already have it in our repository, correct?

mikeizbicki commented 10 years ago

For this assignment, it is acceptable to have the bin directory already exist in the repository. In future assignments, you will have to remove the bin dir from the repository and the Makefile will have to add it. If you want to get a head start, you can go ahead and do that.

The important thing is that there are no files in the bin dir in the repo.