Page 1 of 2

Windows GCC Development

Posted: Tue Jan 10, 2012 6:43 am
by jshriver
I'm tinkering with setting up a Windows development environment and looking for suggestions. I'm primarily a Linux guy so been looking at Cygwin which I used years ago and liked, and see there is also MinGW.

Anyone use either of these and mind a pro/con of either? I use C primarily and C++ only for interfacing with Nalimov egtb code.

Had also thought about trying Visual Studio Free edition, but I'm so engrained with using bash + gcc + vi + make that the last time I tried any VS I had a hard time figuring out how to do a simple non GUI C application and all the build options, added files into my code base and such.

-Josh

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 8:38 am
by UncombedCoconut
MinGW is nice for building native Windows executables. If that's your main goal, you can actually set it up as a cross-compiler on Linux (the easiest method depends on your distro) and build with, say, CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++.

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 9:09 am
by sje
Due to MS bungling the underlying Win32 support, the Cygwin implementation of the select() library routine is a horrorshow underneath and should be avoided. Also with Cygwin, don't expect any support for Unix specific calls which reference user IDs, special file types, timers, some thread functions, etc.

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 9:36 am
by hgm
I always use gcc+cygwin for making the binaries of WinBoard and Polyglot that go into the WinBoard releases. That has never given me any problems.

There is one peculiarity in printing (long long int): the printf in the mcrts DLL that will eventually be called in a -mno-cygwin compile does interpret the formats in a non-standard way, which leads to spurious warnings on format-argument type mismatch by gcc, which does make the assumption the format means what the standard prescribes.

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 11:08 am
by lucasart
jshriver wrote:I'm tinkering with setting up a Windows development environment and looking for suggestions. I'm primarily a Linux guy so been looking at Cygwin which I used years ago and liked, and see there is also MinGW.

Anyone use either of these and mind a pro/con of either? I use C primarily and C++ only for interfacing with Nalimov egtb code.

Had also thought about trying Visual Studio Free edition, but I'm so engrained with using bash + gcc + vi + make that the last time I tried any VS I had a hard time figuring out how to do a simple non GUI C application and all the build options, added files into my code base and such.

-Josh
isn't it much easier to develop on linux, and compile with gcc for linux and windows with mingw, still on a linux machine ? that's what i do anyway: codelite for an IDE and gcc/mingw to compile for linix/windows.

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 4:35 pm
by jdart
I have used cygwin but it's not my primary dev environment on Windows.

You can get the Windows SDK from Microsoft as a free download. (http://en.wikipedia.org/wiki/Microsoft_Windows_SDK). This is basically the command-line version of the Visual Studio compiler. It contains all the header files needed for native Windows app development. Note though this compiler lacks a few features such as PGO and does not include a profiler.

Microsoft NMAKE is not even remotely close to Gnu Make, and a lot less powerful. I have had to maintain two Makefiles, one for GCC or ICC, and one for Microsoft builds using Visual C++.

Re: Windows GCC Development

Posted: Tue Jan 10, 2012 7:06 pm
by Dave_N
I usually prefer an IDE with a debugger, that is the primary reason why I develop mostly in visual studio. I used mingw a lot a few years ago and mainly concentrated on getting things to compile in the terminal, I found most of the projects I downloaded would work on both linux and windows with a bit of makefile hacking. Mingw seemed to run most of my programs very fast, perhaps some extra safety checking in MSVC was to blame. CodeBlock's is a good IDE that supports mingw if you want to use a debugger.

Re: Windows GCC Development

Posted: Thu Jan 12, 2012 9:41 pm
by Jim Ablett
You can find the very latest official versions & 'bleeding edge' binaries of GCC for Windows here >
http://www.equation.com/servlet/equation.cmd?fa=fortran

Jim.

Re: Windows GCC Development

Posted: Thu Jan 12, 2012 9:47 pm
by Don
jshriver wrote:I'm tinkering with setting up a Windows development environment and looking for suggestions. I'm primarily a Linux guy so been looking at Cygwin which I used years ago and liked, and see there is also MinGW.

Anyone use either of these and mind a pro/con of either? I use C primarily and C++ only for interfacing with Nalimov egtb code.

Had also thought about trying Visual Studio Free edition, but I'm so engrained with using bash + gcc + vi + make that the last time I tried any VS I had a hard time figuring out how to do a simple non GUI C application and all the build options, added files into my code base and such.

-Josh
I make my komodo windows binaries from linux using mingw. Very easy and convenient and very portable. So there is no need to soil your hands or compromise your integrity or be seen using Windows if you do not have to do so.

Re: Windows GCC Development

Posted: Fri Jan 13, 2012 3:12 pm
by lucasart
Don wrote:
jshriver wrote:I'm tinkering with setting up a Windows development environment and looking for suggestions. I'm primarily a Linux guy so been looking at Cygwin which I used years ago and liked, and see there is also MinGW.

Anyone use either of these and mind a pro/con of either? I use C primarily and C++ only for interfacing with Nalimov egtb code.

Had also thought about trying Visual Studio Free edition, but I'm so engrained with using bash + gcc + vi + make that the last time I tried any VS I had a hard time figuring out how to do a simple non GUI C application and all the build options, added files into my code base and such.

-Josh
I make my komodo windows binaries from linux using mingw. Very easy and convenient and very portable. So there is no need to soil your hands or compromise your integrity or be seen using Windows if you do not have to do so.
me too, and i cannot agree more with your comments about Windows :D