Tutorial :How to use Microsoft C++ compiler with NetBeans?


I was wondering whether it's possible to use Microsoft's C++ compiler and linker with NetBeans IDE? If so, what's the best way of doing it.

P.S. I'm not interested in Mingw.

EDIT: Is it possible to get NetBeans to do error parsing (so that I can click on error and have NetBeans open the right file), intellisense, etc? I know NetBeans can work with g++ make files. Why not with nmake?


I am currently writing a plugin/toolchain to use Visual C++ on Netbeans.
You can find the project called VCC4N on source forge or on NetBeans plugins.


To be honest, I always do my spare time coding inside an ide (e.g. code::blocks, monodevelop, anjuta) or an editor (virtually always scite), and the compiling I do in a terminal via a makefile (handwritten, cmake, automake).

This isn't really a problem w.r.t. time to compile: F7 (or some other of the F keys) vs. (alt+tab, up, enter), where (alt+tab) and (up) are pressed nearly at the same time, but I get the great benefit of having up to full screen compiler reports, and often I am anyways testing my programs in a terminal. Also, it makes my code more independent of the IDE (ever tried to get a makefile from code::blocks for distribution purposes?).


The visual studio compiler is called cl.exe and the linker is link.exe. These are present in particular visual studio directories. From inside visual studio > project properties > C++ > Command Line, or by disabling "Suppress Banner" option there, you can find the command that visual studio runs. You can call these command lines from inside netbeans.

Getting all the file names into the list to compile may be more tricky. You need a build system for this. You can try to use the same mechanism that visual studio uses, but sorry my knowledge fails there. Alternatively, you can use CMake or some other build system. Then, whenever you add/delete a source file, you would have to update the CMakelist.txt to be able to compile.


You can get syntax highlighting, code graphing etc from netbeans without having a compiler installed I think (not certain, you may need cygwin or mingw for parsing). What you must do is create at least an empty makefile. If you want to use Microsoft's compiler then you either need to:

a) Write the makefile yourself to compile eveything using cl b) Call on msdev from the makefile with the project name and it will compile everything b) Call something like scons from the makefile to compile everything

I use netbeans to develop cross platform software, at this time though, I don't actually run the builds from netbeans.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »