Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to setup a Windows build environment for C/C++

Basically I want to compile C/C++ using the GCC on Windows. The two competing platforms, as i see it, are MinGW and Cygwin. Each have their own benifits and limitations. MinGW compiles for Windows, whereas Cygwin needs the cygwin .dll. However installing libraries on MinGW is difficult, whereas on cygwin it's easier, using the setup.exe as a 'package manager'.

My question is what's the best way to compile on Windows. Would it be better to use MinGW and struggle with libraries (in which case is there an easy way of installing libraries on MinGW). Or should I use Cygwin, if so how do I get it to compile without needing the cygwin .dll, effectively compile for normal Windows.

like image 417
AndrewM Avatar asked Oct 28 '09 19:10

AndrewM


People also ask

Is there a built in C compiler in Windows?

Unfortunately, there is no in-built compiler. You need to install one.


1 Answers

The easiest and best way to compile on windows is to use visual studio express. It is free. A good reason for using cygwin is for cross platform builds. A good reason to use gcc is it supports some compiler candy the Microsoft compiler doesn't.

But all in all VC++ Express is the way to go for windows only development.

like image 146
Byron Whitlock Avatar answered Sep 30 '22 02:09

Byron Whitlock