cygwin gcc problem.

Hi...

I am trying to compile a c file using gcc in cygwin shell. But i am getting an error "no input file".. I have checked the path for nearly hundred times.. The path name is cent percent right and the file exists...
My problem is pictured below,

C:\cygwin\bin\gcc -Wall -O2 "/cygdrive/c/virtutech/src/misc/cygwrap/cygwrap.c" -o "/cygdrive/c/virtutech/src/misc/cygwrap/mysimics/cygwrap.exe"
gcc: /cygdrive/c/virtutech/src/misc/cygwrap/cygwrap.c: No such file or directory

gcc: no input files

Can anyone help me to get out of this situation.... Please....

Replies

  • KenJackson
    KenJackson
    I see you are using backslashes for the command path. Are you running this in Windows CMD or a Cygwin bash?
    You really should be working in bash, but it might work in CMD.

    In CMD, try getting rid of the quotes ("). I think CMD will pass them to gcc, whereas bash would consume them.

    Otherwise, what's your current directory? Can you cd to /cygdrive/c/virtuech/src/misc/cygwrap? And then run this:
    gcc -Wall -O2 cygwrap.c -o mysimics/cygwrap.exe
    Also, does the mysimics directory exist?
  • meeran
    meeran
    Thank you very much Ken...

    Actually i am not manually doing this process.. I have to create a workspace for my simics simulation project.. I gave the below command in my cygwin bash shell in order to create a workspace....

    "MEERAN@RABIYATHRAJA-HP ~$ /cygdrive/c/virtutech/bin/workspace-setup.bat mysimics

    The above batch file do various task to create a workspace as below.

    Setting up Simics workspace directory: mysimics
    Created directory: C:\cygwin\home\MEERAN\mysimics
    Created directory: C:\cygwin\home\MEERAN\mysimics\.workspace-properties
    Created directory: C:\cygwin\home\MEERAN\mysimics\modules
    Compiling 'cygwrap' wrapper
    C:\cygwin\bin\gcc -Wall -O2 "/cygdrive/c/virtutech/src/misc/cygwrap/cygwrap.c" -
    o "/home/MEERAN/mysimics/cygwrap.exe"
    gcc: /cygdrive/c/virtutech/src/misc/cygwrap/cygwrap.c: No such file or directory
    
    gcc: no input files
    The last four lines where the workspace-setup.bat tries to compile the cygwrap is the place of war here. I have checked the path of cygwrap.c and it exists. And the compile operation is automated not manual...

    Please help me...
  • KenJackson
    KenJackson
    Is the virtutech directory under C:\ or under C:\cygwin\?

    Your .bat file is saying it's under C:\.

    GCC is being executed, but it can't find the file, so that path must be wrong.
    My first guess is that virtutech is really under C:\cygwin, not C:\.
    If that's the case, just delete "/cygdrive/c".

    gcc /virtutech/src/misc/cygwrap/cygwrap.c ...

    Otherwise, verify that path. Something in it is wrong.


    BTW, using a .bat file guarantees you are using the Windows CMD shell instead of bash.
    That can work, but it's a shame. Bash is wonderful. I encourage you to use it.

You are reading an archived discussion.

Related Posts

Hi techies , I am new to java and trying to understand arrays but was stuck in concepts , Please any one can explain the following is the code :...
Hi techies , Does any one know with confidence the name of website which provides free web hosting either for limited period or for definite time absolutely free , Please...
JK Lasers, a subsidiary of GSI Group and a leading supplier of fiber and Nd:YAG laser solutions has announced the appointment of Dr Mark Greenwood as its new General Manager....
Wireless Technology to Control and Monitor Anything from Anywhere
October 1: Experimental Observations Confirm Einstein’s General Theory of Relativity - CrazyEngineers MIT Artificial Leaf: Solar Cell Splits Water In H2 & O2 - CrazyEngineers October 3: Ubuntu 11.10 (Oneiric...