Cygwin

This is a discussion on Cygwin within the Tech Board forums, part of the Community Boards category; Originally posted by pauljones2k I can't seem to run the file with gcc. I keep getting a message gcc: command ...

  1. #16
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by pauljones2k
    I can't seem to run the file with gcc. I keep getting a message gcc: command not found. Any ideas?
    Do scan for gcc.exe
    If you don't have it, you must go back and download it. IIRC, its called something like "development packages" in the setup program. You have to look for one that says "compiler" (again IIRC).

    If you have it, then check your path variable. In a bash shell, enter command:
    >echo $PATH
    ... and ensure that the directory with gcc.exe is in it. Mine is in /bin in bash, which equates to C:\cygwin\bin in the Windows environment.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  2. #17
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    Originally posted by Hammer:

    Do scan for gcc.exe
    If you don't have it, you must go back and download it. IIRC, its called something like "development packages" in the setup program. You have to look for one that says "compiler" (again IIRC).

    If you have it, then check your path variable. In a bash shell, enter command:
    >echo $PATH
    ... and ensure that the directory with gcc.exe is in it. Mine is in /bin in bash, which equates to C:\cygwin\bin in the Windows environment.
    I can't still find the gcc.exe file, please can you recommend any places where I can download the single file as I keep reinstalling and nothing happens.

    Thanks!

  3. #18
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by pauljones2k
    I can't still find the gcc.exe file, please can you recommend any places where I can download the single file as I keep reinstalling and nothing happens.

    Thanks!
    Look, just use the setup.exe program installer. Here's a screen print of mine. You have to tick the box in the bin column for gcc.

    This first pic shows the start of the development section.
    Attached Images Attached Images  
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #19
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    ... and this image shows where gcc is listed (ie further the list)
    Attached Images Attached Images  
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #20
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    I have successfully installed gcc.exe by installing the software again from scratch. I am now trying to run a program but it keeps saying samp: command not found. samp.c is the file that my program is and I typed in gcc -o samp samp.c and that worked fine. When I type in samp again, I get the message "bash: samp: command not found and I application file is stored in my folder. Any ideas?
    Last edited by pauljones2k; 11-30-2002 at 05:44 AM.

  6. #21
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >I have successfully installed gcc.exe
    Congrats

    >command not found
    Do you know about the PATH variable in your environment? To see it, type
    >echo $PATH
    Its a list of directories that are searched for the program names you enter. The current directory you're in is represented by a single dot.

    Based on your error message, you'll probably find that . isn't in your path, so either add it, or simply run your program like this:
    >./samp
    (dot slash pgmname)
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. NetBeans + Cygwin driving me insane
    By Del75 in forum C++ Programming
    Replies: 4
    Last Post: 08-17-2008, 06:03 AM
  2. cygwin sshd weird behavior
    By jEssYcAt in forum Tech Board
    Replies: 6
    Last Post: 05-19-2008, 03:05 PM
  3. Problems with compiling code in cygwin
    By firyace in forum C++ Programming
    Replies: 4
    Last Post: 06-01-2007, 09:16 AM
  4. Cygwin and coLinux
    By Mario F. in forum Tech Board
    Replies: 8
    Last Post: 07-03-2006, 03:00 PM
  5. Cygwin Server
    By osal in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-07-2005, 12:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21