Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-03-2006, 04:58 PM   #1 (permalink)
 
Ultra Techie

Join Date: Apr 2005

Posts: 950

M4A1 is on a distinguished road

Send a message via AIM to M4A1
Default Cygwin

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!
M4A1 is offline  
Old 08-03-2006, 05:51 PM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

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.
jaeusm is offline  
Old 08-03-2006, 10:19 PM   #3 (permalink)
 
True Techie

Join Date: May 2006

Posts: 150

fjf314 is on a distinguished road

Send a message via AIM to fjf314
Default

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.
__________________
There are 10 kinds of people in the world, those who understand binary and those who don\'t.
fjf314 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On