CrazyEngineers
  • meeran
    meeran

    MemberOct 12, 2011

    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
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • KenJackson

    MemberOct 12, 2011

    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?
    Are you sure? This action cannot be undone.
    Cancel
  • meeran

    MemberOct 13, 2011

    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...
    Are you sure? This action cannot be undone.
    Cancel
  • KenJackson

    MemberOct 13, 2011

    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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register