tags:

views:

371

answers:

10

Do I really need Visual studio to build c/C++ application on Windows. Is there any way to have makefiles and get the application built.

A: 

No you do not. There are many free IDE's out there, or you can do everything from the command line with a non-microsoft compiler.

www.bloodshed.net offers a pretty good IDE that uses the Mingw compiler.

Malfist
Well, even if it was great, AFAIK bloodshed devc++ development has stopped, no ?
neuro
kindof. It's a very basic, easy to use and get started with IDE.
Malfist
+10  A: 

You can use any compiler that'll target Windows (for example, MinGW, Digital Mars, Comeau or others). All of them can be driven by the command line so you can use your preferred make utility (or other build utility).

That said, Visual Studio is pretty nice (even the free version). And don't forget that it installs the command line compiler tools, so you can drive it from a makefile as well (unfortunately, it won't spit out a makefile for you anymore, but it has it's own command line tools to drive a build based on project settings if you want to jump from IDE to command line builds).

Michael Burr
I wouldn't call that "unfortunate" actually. Their version of make was kinda retarded. If I'm going to use make at all, I'll use my own, thank you.
T.E.D.
At least nmake doesn't do that crazy thing with treating a tab at the start of a line as a special token (different than a space at the start of a line). As Feldman (the inventor of `make`) noted, "I just did something simple with the pattern newline-tab. It worked, it stayed. And then a few weeks later I had a user population of about a dozen, most of them friends, and I didn't want to screw up my embedded base. The rest, sadly, is history." (http://catb.org/esr/writings/taoup/html/ch15s04.html)
Michael Burr
+1  A: 

You can even do without extra tools as long as you have the compilers on your machine. Take a look here for an explainatin:

http://msdn.microsoft.com/en-us/library/ms235639.aspx

Noctris
+1  A: 

No, you don't.

I know you said c, but you can also check out MonoDevelop, should you choose to do more than just that: http://monodevelop.com/Download

Oren Mazor
+1  A: 

Not at all. It is quite possible to do Win32 programing, including OS and GUI programming, with gcc from Mingw.

For all my hobby work, if I can I use the gcc compiler from Mingw (for C or Ada), with Emacs as my IDE and gnumake for my build system. There are good Mingw ports for all the major revision control systems too, including Git.

That's the toolset I used to create the SETI@Home Service, which was a wrapper for the SETI@Home client that installed and ran it as a Windows service, did failure detection and auto restarts, and had a built in web server for monitoring. All that with no VisualStudio.

T.E.D.
+5  A: 

If you want to stick to the Microsoft toolchain but don't want the IDE, you can use cl and link to build from the command line in conjuction with either the MSBUILD system or NMAKE.

If you don't have the compiler it is available free with VC++ Express.

Ron Warholic
Thanks, This is what I am looking for, So I guess I need to write some makefiles compiliant with NMAKE and I am done.Does NMAKE support x64 and ia64 platform support
Avinash
It supports everything the compiler supports, just make sure you set your makefile options correctly and use the x64 command prompt if you intend on building an x64 build. I'm not too sure if it has explicit support for ia64, it might be worth googling around to see.
Ron Warholic
Note that nothing stops you from using any other build system with VC++ - one project I've worked on in the past used Watcom Make with VC++ (for historical reasons). Many people use MSBuild. Some use GNU make. And so on. In the end, make is usually language- and compiler-agnostic, and only really cares about dependencies.
Pavel Minaev
any link where I can see nmake compiliant makefiles
Avinash
+3  A: 

Qt is very nice, and downloading and installing the SDK gets you the QtCreator which provides a consistent IDE across platforms, with very nice builtin help, build system, access to revision control, debugging, ... and it even includes the MinGW compiler and toolchain for you.

MinGW is something simpler: the usual GNU toolchain but setup such that it provides native Windows binary.

Last but not least, there is Cygwin which gives you the most Unixy flavour.

Dirk Eddelbuettel
About to write the same thing :)
elcuco
+1 for Qt Creator (and Qt in general.)
Rob
+4  A: 

To install the Microsoft compiler without installing an IDE download the Windows SDK which is available for free.

http://en.wikipedia.org/wiki/Windows%5FSDK

voxmea
+1  A: 

You can use Eclipse with C/C++ Development Toolkit and with Mingw Compilers. the only problem is that you will not have M$ Stuff like MFC, but you can use QT or wxWindows

Baget
+1  A: 

Two solutions that immediately come to mind:

Using makefiles does not prevent you from using the Microsoft C++ compiler, which is nice if you want to use the VS debugger.

StackedCrooked