C++ Support

Daniel Grunwald edited this page Sep 15, 2012 · 1 revision


Welcome to the C++/CLI support page. I found that only a few has a clear idea of what to do to make SharpDevelop support C++ completely. Hence, I created this page to enable all to know what is actually needed.

This would be my proposal and submission fot the GSoC event. Since the time frame of GSoC is narrow, I will accomplish some of the C++ support features for this event and pursue on to create the full support within this year.

Hopefully, by 2010, #D would have a fully-functional C++/CLI support module. And I hope to see #D 4.0 prowling around with professional, state-of-art C++/CLI project support.

Anyone can contribute to this page to make it a point of discussion for C++/CLI support.

This page was created based on my discussions with Bernhard Spuida, David Srbecky, Christopher Wille and my general forum discussions.

And I plan to keep it my base while I'm working for the project. I'll update it as and when I'm accomplishing certain tasks.


Chris recommends one to explore Visual C++ 2008 before starting to work on the C++ editor. A free trial copy can be downloaded here.

Anyone interested in implementing the C++/CLI support must first explore the partial add-in project available in the samples/ directory in the SharpDevelop source code. It may be obtained here. The sample has a basic C++ project. It just needs some modifications.

The following improvements are needed to make it workable:

  • Make MSBuild to communicate with the compiler and execute the output.
  • Allow creation of C++ project files.
  • Allow creation of new files to the C++ project.
  • Create a 'project options' dialog.
  • Create code-completion service for C++ projects.$
  • Create the Smart-Indentation service.$

They are further briefly explained below:

1. Combining the C++ compiler and the MSBuild

If MSBuild is integrated with C++, it would be pretty easy for extending C++ support.

Looking at the CodeGuru website article on MSBuild tasks, gives us a rough idea on what MSBuild is what it does in the VC++.

A short gist of the article would be this:

`{{''MSBuild is a documented, powerful, and extensible build engine that far exceeds the{BR} capabilities of the previous Visual C++ build engine. MSBuild takes Items and associated {BR}Properties as inputs into a Task, and Tasks are grouped together into Targets to form a high-{BR}level build activity. MSBuild will be welcomed by C++ developers who miss the power and {BR}expressiveness of MAK files, and for developers who have yet to explore the world of {BR}build customization and extension, the introduction of MSBuild as the project file format for {BR}Visual C++ 2010 represents the best time to get started.''{BR}

::::::::::::::::::::::::::::::::::::::::::- ''CodeGuru''`}}

But, this step is very difficult to accomplish by ourselves and it is not worth the effort as Microsoft will do just that in its upcoming VC++ of the VS 2010 edition. Hence, we will not work on it now.

Instead, we could use VCBuild.exe directly (the sample in SharpDevelop/samples/CppBackendBinding demonstrates this). But starting in VS 2010, MSBuild can be used with C++.

More details on the new build task: http://blogs.msdn.com/vcblog/archive/2008/12/16/msbuild-task.aspx

You have to build the #D first before building any of the sample projects or add-ins.

Explore a little of the code with some IDE(either use #D itself or use VS08 if you have it). Find out where the compiler is called. There you may have to make some changes to make it call or trigger the MSBuild instead.

2. Creating project files


3. Creating new files in the project


4. Create a 'project options' dialog

The MSBuild project format in VS2010 allows users to define their own options dialog pages. See the link below: {BR}http://blogs.msdn.com/vcblog/archive/2009/04/01/vc-msbuild-extensibility-example.aspx {BR}{BR}

5. Syntax-Colorisation service

This service can be easily implemented using only the Lexical Analyser or more commonly known as Lexer.

5. Code-completion service

This and the next project will be tough to implement as they need a fully functional open source C++ parser. I searched for weeks and couldn't find one. If anyone knows where I can find one, just drop me a line. I couldn't move on without that parser...

You can use the sample project 'HTMLSyntaxcolorizer' as an example for this. That should effectively prove to be a first step.

6. Smart Indentation service



  1. Symbol $ - {BR}Implementation will be done at a later stage and is not intended for the GSoC event.



  • [http://msdn.microsoft.com/en-us/library/w7hc4wz6.aspx|C++ Settings/Specifications]{BR}
  • [http://msdn.microsoft.com/en-us/library/zdbe067e.aspx|Visual C++ Whats New?]{BR}
  • [http://www.codeguru.com/columns/kate/article.php/c15857/|MSBuild for Visual C++ 2010]{BR}
  • [http://www.developer.com/net/cplus/article.php/3807746|Custom MSBuild tasks for Visual C++]{BR`}

Contributers and Interested Members

Contact Members