Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling with gcc (cygwin on windows)

Tags:

gcc

cygwin

I have cygwin on windows through which I run gcc. But after creating .exe files, if I run them on other computers which dont have cygwin, it says cygwin1.dll not found. Is there a way to compile them so that they run on any system?

like image 731
avd Avatar asked Sep 25 '09 06:09

avd


People also ask

How do I run gcc on Windows?

To do this, press the Windows key, type cmd , right-click Command Prompt, and then select Run as Administrator. Once the prompt window is open, double-check that the compiler installed properly (and that the environment variables are set) by running the command gcc -- version at the prompt.


1 Answers

You need to compile for MinGW (Minimal GNU Win32) mode. You do that by either installing mingw instead of (or in addition to) cygwin, or by passing the --mno-cygwin compiler option to the cygwin gcc.

like image 86
Martin v. Löwis Avatar answered Oct 27 '22 13:10

Martin v. Löwis