Cygwin

Status
Not open for further replies.

M4A1

Daemon Poster
Messages
957
I have installed Cygwin and the necessary libraries. If I have a program.c, does it have to be in a certain directory for it to compile? I'm going through command line. I have XP. Thanks!
 
No, but you need to either specify the path explicitly like this:
Code:
gcc /src/myPrograms/myFile.c

or, cd into the directory where your file is located.
 
Exactly. Where you save your file to doesn't matter, but when you try to compile it, the compiler isn't going to search your machine for the file. As such, you have to either specify where the file you want to compile is located or you have to navigate to the directory the file is in before you try to compile.
 
Status
Not open for further replies.
Back
Top Bottom