When I follow the directions from Problem Set 1 on the website, I get an error code when I type in clang hello.c and when i type in ls the list doesn't show up. Before I made the new file so I could type the #include etc. it worked when I put in ls. But now after it says ~/pset/hello/, it won't work. So what do I do?
Ahh I figured it out!
Instead of using ~/pset1/hello/ $ go back to just the directory pset by using change directory
~/pset1/hello/ $ cd ~/pset1/
then add your ls command
~/pset1/ $ ls hello/ hello.c
then compile ~/pset1/ $ clang hello.c
adds the machine code to your directory and then you can execute!
My only questions now is about the hello/ . This is in my file tree below pset1/ , was I not supposed to add this in?
My list now shows this ~/pset1/ $ ls a.out* hello/ hello.c
Hope this helped you a little!
Hey just to piggy back on your question, I'm having the same problem! Can't believe I'm getting stuck on the very first part!
I've created all my directories, saved as hello.c, I'm up to the ls command. My prompt in the terminal is
then when I type ls and enter it just shows me the same prompt again when I think it should show me hello.c ? Then if I try to compile it just says no such file or directory. Am I saving my file wrong or maybe in the wrong place? It's definitely a c file and not a text file.
Would really appreciate some help!