mardi 4 août 2015

Compiling on Mac

I am brand new to this forum, and have just begun to learn C. The book I am going through wants me to compile the code that was written. I have a file "cards.c", I am on a Mac, have Xcode installed, downloaded gcc from Apple and installed it.

$ gcc -v
Configured with: --prefix=/Applications/http://ift.tt/1d5DwEL --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

When I type:

gcc cards.c -o cards

I get:

clang: error: no such file or directory: 'cards.c'
clang: error: no input files

I have tried going to Xcode downloads to install Xcode's Command Line Tools, it doesn't show up there, maybe I have a newer version?

I cannot figure out how to compile this, any ideas on what I am doing wrong?

Does the cards.c file need to be in a specific folder somewhere?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire