Wednesday, December 13, 2006

Migrating from Visual C++ to CDT

I've put the finishing touches on the CDT's managed build support for the Windows SDK. Well, at least there's enough there for people to try with our upcoming CDT 4.0 milestone (M4, but it's really our first for this release). It auto-detects where you've installed the compilers, header files, libraries, etc., by looking it up in the registry. I've also updated the error parsers to more accurately parse compile and link errors. It works pretty good and I'm using it to build the native code for the Windows debugger integration.

But, you know, I forgot about the standard builder. It's funny how you get tied up in solving the hard problems when the easy ones are there staring you in the face. I have to give a big thanks to three guys from IBM India who have written a tutorial on how to import Visual C++ projects into the CDT. The solution is elegant in its simplicity and really shows the flexibility of CDT's standard make projects.

All you need to do is get Visual Studio to generate the makefile for you. This is a feature that they've always had to support external builds (although in recent versions you can run Visual Studio headless to do builds as well). Then you create a CDT project at the root directory containing your source. Of course you'll have to change the make command to use nmake, Microsoft's own nasty version of make, but that's pretty easy to do and works well.

Combine that with this guy's perception that the CDT has certain features that Visual Studio users would like, and the discussions I've had with embedded developers using CDT but using Visual Studio for emulation on Windows, gives me a warm fuzzy that supporting the Windows SDK is the right thing for the CDT. There are Windows developers who are looking for a migration path to get into the Eclipse ecosystem.

6 comments:

  1. I am so very excited about this. I've spent the past few days playing with the CVS version and trying to get my code to compile. Overall it's worked like a charm, though I can't quite figure out how to get the resource files to compile inside the managed builds.

    ReplyDelete
  2. Oh, yeah, resource files. Shouldn't be too hard. I'll try to get that into M4. Although that means getting them working by the end of this week. Doable, though.

    ReplyDelete
  3. This is great news! I have followed along with the CDT story and this is one thing that I have really wanted. I've started looking at the integration with the microsoft debugger and that looks really cool. Is that going to be in 4.0 M4? And if not, how do we build it ourself to test it out? I know, it's probably on the wiki or the mailing list and I just haven't seen it ;)

    ReplyDelete
  4. Oh cool I found http://cdt.eclipse.org/cvslog/HEAD/index.html with all the CVS commit information. Now it's time to play with the nightly build :)

    ReplyDelete
  5. Debug is not quite working yet. It is actually quite complicated and will not likely be ready until our final milestone in April.

    ReplyDelete
  6. hi let me tell you that Migrating from Visual C++ to CDT
    its quite interesting so i going to think about it i really im agreed and i also want to buy viagra and feel better .

    ReplyDelete