Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler for Win32 Programs?

Tags:

c++

c

winapi

I'm going to start learning how to program applications for Windows. I'm not sure what compiler I should use. Right now I'm using the Code::Blocks IDE 10.5 and got used to it and would like to stick to it.

I don't know if I should use the GNU GCC compiler or the MSVC++ 2008 compiler. Is there any reason to pick one over the other when creating a Win32 GUI project?

And how can I tell the compiler/linker to look in the Windows SDK directory instead of it's own directory?

like image 338
Mikhail Peralta Avatar asked Oct 23 '25 14:10

Mikhail Peralta


2 Answers

You can use any of those with Code::Blocks. Pick the one you like the most. As for telling the tools about the Windows SDK, right-click your project and pick "Build options...":

The Build options dialog

Add <SDKPath>\include (C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include on my machine) to the compiler directories, and to linker directories add <SDKPath>\lib (C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib on my machine)

like image 62
R. Martinho Fernandes Avatar answered Oct 25 '25 03:10

R. Martinho Fernandes


+1 to Visual Studio. You'll handly find anything better than this for Windows. You can also use comand line gcc / g++ from Cygwin console, but I still use VS as the code editor. You'll get VS2008 Express for free here:

http://www.microsoft.com/express/Downloads/

like image 28
Tomasz Kowalczyk Avatar answered Oct 25 '25 05:10

Tomasz Kowalczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!