My C program won't build.
I put it in terminal, using gcc and then dropping the file in, and get no errors, but it doesn't create an executable file.
Xcode-OTHER
I put it in terminal, using gcc and then dropping the file in, and get no errors, but it doesn't create an executable file.
Xcode-OTHER
What command are you using?
I was following the steps in this video: http://www.youtube.com/watch?v=Oa6FDffyYf8
But where he said there should be a .out file created is where I am having trouble because no new file was created for me.
are you looking in the correct folder? if you type
ls a.out
at the prompt in the terminal what happens?
If you still can't find it post the complete compile command and any output.
It still can't find the file.
Brittanys-MacBook-Pro:~ Brittany$ gcc /Users/Brittany/Desktop/HelloWorld.c
Brittanys-MacBook-Pro:~ Brittany$ ls HelloWorld.out
ls: HelloWorld.out: No such file or directory
Unless you specify the name of the output file, "a.out" is created.
Ahhh, okay, thank you 🙂
Now, how do I specify the name of the output file?
The compiled code will be called a.out unless you specify a name on the compile line.
This was mentioned in the video you linked to and in your second post above. In my post I asked you to so an
ls a.out in the terminal.
If you're going to learn to program you will need to learn to follow directions.
good luck
regards
Message was edited by: Frank Caggiano -o filename
One of the several options under gcc ... -o I just read. Might want to read through that 'man gcc' because of all the options available, if if you do not understand them all....
My C program won't build.