With most C/C++ projects on Windows® developed with Microsoft® Visual Studio®, it is essential to study the migration of these projects to Eclipse, the open source IDE. This article provides a brief step-by-step procedure for migrating Microsoft Visual Studio C/C++ (MSVC) projects to Eclipse. It compares and contrasts the benefits of MSVC and Eclipse CDT.
//
The Eclipse Platform is an open source tool to assist you with moving a project from the design to the test phase within a single development environment and without the need for separate tools for each stage. Eclipse was developed to assist the tools development community, concentrating on the core functionality of the tool instead of concentrating on the IDE itself. This is achievable because of programming model of Eclipse, which supports software building blocks called plug-ins.
Originally, Eclipse started with Java programming IDE, as it was the need of the hour. Because of its extensibility, it was embraced for developing applications for other programming languages, such as COBOL and C/C++.
The focus of this article is on C and C++ applications. Most C and C++ projects for deployment on Windows are developed using Microsoft Visual Studio. This article provides a step-by-step procedure for migrating Microsoft Visual Studio C/C++ (MSVC) projects to Eclipse. Along the way, we compare and contrast the benefits of using MSVC and Eclipse CDT.
Visual Studio and Eclipse compared
Microsoft Visual Studio has a long history with wide use among Windows application developers. It is the leader in C and C++ Microsoft Windows application development, as well. By contrast, Eclipse CDT is relatively new and quite popular these days in the developers community. Eclipse CDT is designed to satisfy the developers of many OS platforms, such as Linux®, and is dependent on the gcc compiler and other open source tools.
There are many ways of comparing Eclipse with Visual Studio. One can compare the user interface (UI), architecture, cost, manageability, and many other criteria. Since this article looks at C and C++ development, we compare and contrast the strengths of both the tools with respect to C and C++ application development for Windows.
C/C++ development compared on Windows
|
Microsoft Visual Studio C/C++ |
Eclipse CDT |
| Nature of license |
Proprietary |
Open source |
| Programming languages supported |
Specific to C/C++ and Microsoft-supported programming languages |
Parallel different programming languages (COBOL, the Java programming language, and others), along with C/C++ |
| SDLC phases supported |
Only coding |
Designing, coding, configuration management, testing, etc. |
| Debugging |
Complete debugging support |
No debugging support; debugging support available only for gcc-compiled C code on platforms other than Windows. Microsoft Debugging Tools for Windows required |
| Resource editor |
Comprehensive resource editor |
No resource editor |
| Testing |
No testing tools as part of Visual Studio; third-party tools must be used |
CppUnit can be used (see Resources for more information) |
| MFC programming |
Development support for MFC application (wizard, code templates, etc.) |
No support |
| Plug-in tools development |
Visual Studio 6 does not support any plugable software components |
Based on a plug-in architecture |
| Tools specific to Microsoft Windows |
Spy++, error look-up, ActiveX Container, and others |
No tools specific for Windows platforms |
 |
About CDT
Eclipse C++ Development Toolkit (CDT) is an extension to the Eclipse platform in the form of a plug-in. This plug-in is available for download for all platforms. The open source nature of the plug-in with its user-friendliness makes it more popular not just among the Linux developers but also among C++ developers on other platforms. CDT and the Web Tools plug-ins are the two most popular Eclipse plug-ins. Nearly two out of three developers using CDT are Windows users.
CDT has subcomponents or plug-ins that are independent projects in the CDT community. The most important is the CDT primary plug-in, which provides the core CDT capabilities. CDT Debug UI provides the UI capabilities for the debug editors and views. CDT UI plug-in provides the UI-related features, views, editors, wizards, etc. CDT Debug provides core debugging capabilities. CDT Feature provides CDT Feature component. CDT core presents Core Model, CDOM, and other core components. CDT Launch provides launch mechanism for launching external executables and tools. CDT Debug MI is the application connector for MI-compatible debuggers.
CDT editors have several features that make them popular. For example, syntax highlighting and code assist make software development quick and easy. Syntax highlighting is configurable and can be personalized to your individual taste. Code assist is the code completion feature that is similar to the one in Visual Studio. Custom-defined code templates can be added to the plug-in, which can be used by code assist.
In the following sections, we will learn how to use CDT effectively to migrate the Visual Studio projects to the Eclipse CDT Workbench.