Error running program in cmd - cygwin.dll missing -

This is a discussion on Error running program in cmd - cygwin.dll missing - within the C Programming forums, part of the General Programming Boards category; I use cygwin for compiling my programs and running them too, however if i try to run that same .exe ...

  1. #1
    Cogito Ergo Sum
    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    463

    Error running program in cmd - cygwin.dll missing -

    I use cygwin for compiling my programs and running them too, however if i try to run that same .exe file on the cmd in windows vista, it says error cygwin.dll missing, I gave it to a friend to run, he doesn't have cygwin, and he tried running it through cmd, and it still gave the same error.

    How can i fix it, so that I can run my exe files on cmd or any method without the need for having the cygwin interface?

    Thanks

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Why not just distribute the cygwin dll with your application? Ie it resides in the same directory... which also ensures they're running the version you want them to.

  3. #3
    Cogito Ergo Sum
    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    463
    I don't get it, it doesn't run on my computer either.

    I got cygwin installed in C:\cygwin

    and the code and exes are in c:\cygwin\home\owner

    So i go to cmd and type cd c:\cygwin\home\owner

    then type applicationname.exe

    and it gives an error. I specified the path, the cygwin folder itself, do i need to put the cygwin.dll in the system32 folder or something?

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Yes, Windows will check for the cygwin.dll in the following locations (in order)

    1. The directory from which the application was launched
    2. The working directory (Usually where your program resides)
    3. System32
    4. All other directories listed in the PATH environment variable

  5. #5
    Cogito Ergo Sum
    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    463
    Oh right, yep it works now, thanks a lot dude

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by JFonseka View Post
    I use cygwin for compiling my programs and running them too, however if i try to run that same .exe file on the cmd in windows vista, it says error cygwin.dll missing, I gave it to a friend to run, he doesn't have cygwin, and he tried running it through cmd, and it still gave the same error.

    How can i fix it, so that I can run my exe files on cmd or any method without the need for having the cygwin interface?

    Thanks
    If you plan on distributing your cygwin-ified apps, you might as well link the cygwin library statically. There's no real advantage to distributing it as a DLL, and it relieves you from the headache of writing an installer to make sure it gets installed in the proper place.

    This usage is SPECIFICALLY ALLOWED by the Cygwin license.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 06:49 PM
  2. Windows cmd program
    By Mikecore in forum C Programming
    Replies: 1
    Last Post: 02-06-2006, 07:44 PM
  3. Compile Program missing .lib file have .dll
    By John Hobbes in forum C++ Programming
    Replies: 1
    Last Post: 11-19-2004, 04:52 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

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