Cygwin

This is a discussion on Cygwin within the Tech Board forums, part of the Community Boards category; I have just downloaded Cygwin from http://www.cygwin.com and I have installed it but I don't know how to run it. ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    14

    Cygwin

    I have just downloaded Cygwin from http://www.cygwin.com and I have installed it but I don't know how to run it. I have Windows XP and the files have been installed but I am not sure as I am a newbie. Any help will be grateful.

    Thanks!

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Read this and this.

    Moving to tech board as this ain't a C question....
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    I still don't understand how to run it, I have all the folders installed but still no luck.

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    Ok, here it goes. I have a folder on my desktop named ftp%3a%2f%2farchive.progeny.com%2fcygwin. Inside that is a folder called release and in that it has various folders that contain BZ2 files which I can't run. There is also setup.log.full file on my desktop and in my C:\ drive I have a cygwin folder with two folders etc and var. Any ideas how to run this thing?

    Thanks!

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    I presume that you've downloaded all the packages then. I think you run the setup.exe program, and select install from local directory, and point it to the ftp*** directory. Once this process is done, it should create a cygwin.bat file in c:\cygwin, which will contain something like this:
    Code:
    @echo off
    
    C:
    chdir \cygwin\bin
    
    bash --login -i
    Run that bat file to open the shell. Also, it should create a folder on your start bar, IIRC.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    Thanks for the reply and it seems I have reached the next level as it has installed various icons but I still can't run and open the program. Some black MS DOS windows opened but then they closed. I do not know what to do now and don't understand where I am meant to type that coding you stated. Please help me as I think I have nearly got to the problem.

    Thanks!

  7. #7
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You're not meant to type that code in, it should already be in there for you. I was just showing you it so that you might check for it's existence on your system.

    Anyway..... I'm not sure what's happening with the disappearing Window. Obviously the program its running is either terminating straight away or is not getting run at all.

    I don't know if this will help diagnose your problem, but try and see what happens:

    - Get a regular Windows console window open, and CD your way to cygwin\bin, maybe like this:
    >C:
    >cd \cygwin\bin
    - The type
    >bash --login -i
    and see what happens.
    The bash.exe file should be in that directory, so if it doesn't work, check for it actually being there.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  8. #8
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    I searched my hard drive and then found the bash.exe file. I opened it up and it opened a MSDOS type box. I need to know how I am mean't to open the shell and I tried to type in what you told me but when >bash --login -i was typed in, it said command not found.

  9. #9
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >I opened it up and it opened a MSDOS type box.
    Did it stay open and leave you ready to type at its prompt? If so, that's the shell probably. You do realise its only a command line interface?


    >it said command not found.
    Then it couldn't find bash.exe ... are you sure you were in the correct directory? Did you CD \cygwin\bin ?

    Once you get in to it, type pwd to check you're actually there (this will print the currect directory name)
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  10. #10
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    When I type in pwd, it states that I am in the /usr/bin directory. I type in CD \cygwin\bin and it says "command not found".

  11. #11
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    I type in CD >\cygwin\bin and it worked this time as I forgot to type in > at the beginning of the line. I am now in the next line of the command and typed in >bash --login -i and now I am on the next line. What do I type in next, bearing in mind that pwd still is on the /usr/bin directory.

  12. #12
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    OK, first up, the > symbol in my previous posts is there to represent a command prompt, it isn't something I expect you to type in as part of the command.

    Second, bash is case sensative, so CD is not recognisable, but cd is.

    Third, in bash you use forward slash for a directory, not backslash.


    >>When I type in pwd, it states that I am in the /usr/bin directory.
    OK, so this presumably means your in a bash shell, which leads me nicely to my last question:

    Now, once you're in bash, what is it you actually want to do?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  13. #13
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    So I assume that I have successfully opened up Cygwin. I know the basics of C Programming but I still don't know how to do a simple program without some help of a template (which is ok as I will be able to use previous programs for the test). I know how to run using gcc -o command. I was hoping this would be a shell like I use at Uni but that is with Linux so does this mean that I will have to use Cygwin in a MSDOS window in Windows XP, if it does I don't mind but if I can get the shell, please tell me how and what I need. I need help with looping, strings and functions for a program. Any help will be greatly acknowledged.

    Thanks!

  14. #14
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    I write a few apps under Cygwin that are destined for *nix boxes. It's great to have a "Unix emulator" on my PC.

    I presume you're OK now, just create a small C file, and compile it with gcc and see what happens.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  15. #15
    Registered User
    Join Date
    Nov 2002
    Posts
    14
    I can't seem to run the file with gcc. I keep getting a message gcc: command not found. Any ideas?

Page 1 of 2 12 LastLast
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