English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am trying to use the gcc function but it doesn't work. I have CHECKED my program file and it's extension is .c. Everytime I type gcc samp.c -o samp.exe I get:
gcc: samp.c: no such file or directory
gcc: no input files
Do I need to save the samp.c in a specific directory?

2007-11-05 08:33:09 · 2 answers · asked by Shadow973 1 in Computers & Internet Programming & Design

2 answers

Are you sure that samp.c is in the same directory that you are in at the moment? gcc will not search for your file beyond the current working directory.

From the shell prompt, type: pwd

You will get an answer like /cygdrive/c/Documents and Settings/Administrator

The "/cygdrive/c/" portion of the pathname represents Cygwin's translation for "c:/".

You may need to cd to the correct location. Fortunately, cd understands Windows-style pathnames, so you can do something like: cd "c:\Documents and Settings\Administrator\My Documents\C programming"

(Note the double-quotes around the pathname.)

Good luck!

2007-11-05 08:48:30 · answer #1 · answered by Joseph C 2 · 0 0

put it in bin directory.

you may download
DevC++
free from
www.bloodshed.com

2007-11-05 16:45:14 · answer #2 · answered by iyiogrenci 6 · 0 0

fedest.com, questions and answers