CDT + MSVC = JOY?
March 4, 2008 9:43 AM   Subscribe

Is it possible to use Microsoft Visual C++ as the underlying compiler for Eclipse with CDT?

I like GCC, but I'm inheriting an existing codebase and MSVC is a requirement.
posted by king walnut to Computers & Internet (6 answers total)
 
The command line compiler for c++ in the current Visual Studio is cl.exe (c# is csc.exe, vb is vbc.exe). There's also an Ant-like build manager command line executable for Visual Studio projects but its name isn't coming to mind right now.
posted by XMLicious at 9:51 AM on March 4, 2008


Google says yes.
posted by rhizome at 9:51 AM on March 4, 2008


There it is: msbuild.exe is the command line build manager.

(So, find wherever it specifies the compiler and / or build executables in Eclipse and you ought to be able to specify the Visual Studio equivalents.)
posted by XMLicious at 9:54 AM on March 4, 2008


Response by poster: Hmmmm. Thanks for the responses, but...
The "Google says yes" link doesn't seem to have anything to do with my question. It is somebody's thoughts on Eclipse vs. Visual Studio.
I know what the MSVC command-line tools are; I can't seem to find a place in the CDT configuration screens that would let me insert these commands.
posted by king walnut at 11:47 AM on March 4, 2008


Ya, you found the right person. I wrote a plugin to migrate the CDT default mingw compiler to my companies own compiler. It's a lot of work to make it happen automatically, but you can do it with a few option changes for each project you want to run through visual c++ compiler.

Yup, you want to right click on your project and select properties. Your going to change the tool settings under C/C++ Build. If you just want to change to a different compiler that is already on the path, change the command that is called in each build step (Compile, link, etc) to your visual c++ executable. If you need to change command line options, this is the place to change them as well.

The programmers guide under the help menu->CDT plug in developers guide offers much more info, probably way more in depth then you are looking for, but has lots of clues.
posted by ShootTheMoon at 12:30 PM on March 4, 2008


Also, here's the Eclipse Managed Build System Extensibility Document. It looks as though it's pretty similar to customizing MSBuild or Ant, editing XML files and whatnot.
posted by XMLicious at 12:35 PM on March 4, 2008


« Older I'm trying to find an index of BBC Music Magazine...   |   Help me find a better math placement test solution... Newer »
This thread is closed to new comments.