6

I'm trying to port a linux software in Windows. My software depends on gtk, boost and libgerbv (which I've manually compiled on cygwin) I've successfully compiled it and it works if I run it in the cygwin's terminal, but if I copy the .exe in a folder with cygwin1.dll and I run it, it terminates silently Same result if I run it within cmd.exe.
How can I "export" this executable outside the cygwin environment? I want to distribute it with just the needed shared libraries and cygwin1.dll

Thanks

Dmitry Alexandrov
  • 1,586
  • 11
  • 13
Corna
  • 71
  • 1
  • 4
  • 2
    From my experience cygwin apps do not work well outside cygwin shell. Have you tried MinGW http://www.mingw.org/ or MSYS http://www.mingw.org/wiki/MSYS? – doc Dec 28 '14 at 17:52
  • 1
    Use the [Dependency Walker tool](http://www.dependencywalker.com/) to ensure that you have all the DLL dependencies. – Michael Burr Dec 28 '14 at 18:24

1 Answers1

4

"How can I "export" this executable outside the cygwin environment?"

In short: That's not possible. You'll need to have a cygwin environment installed on the target machine, and run the programs created in cygwin from a cygwin shell.

Cygwin requires a number of it's own .dll files, to bind to the underlying Windows OS. These cannot be just copied to another windows system without having a complete installation of cygwin.

Here're some more details about this: What is the difference between Cygwin and MinGW?


That's why I prefer to use MinGW to target windows systems portably. Cygwin has it's powers and right to exist, when it comes to cross compile code for different (e.g. embedded) targets running on windows as host.

Community
  • 1
  • 1
πάντα ῥεῖ
  • 83,259
  • 13
  • 96
  • 175
  • 3
    Why simply copying relevant Cygwin libs (including `cygwin1.dll`) to the folder with executable will not work? This worked for me in the past and also for [other people](https://stackoverflow.com/questions/8888967/running-c-executables-compiled-in-cygwin-on-windows). – yugr Jan 19 '20 at 15:39