Native & managed code?

Native & managed code?

Visual C++allows you to combine native and managed code in the same program. If you do,are there any issues withTBB?

Using the C++/CLI language I've developed a test application which combines classic native C++ with calls to a .NET library called WPF (Windows Presentation Foundation) to build theGUI. This works fine but my concern is that this native/managed mix isincompatible with TBB. It works with OpenMP (according to Microsoft) but I'm not sure whether it extends to TBB as well.

The reason for my concern is this article in Dr. Dobbs Journal,

http://www.ddj.com/cpp/201200614

where James Reinders says "I'd like to do everything at once and tackle Java and .NET now, but since we cannot, I feel good about the decision to start with C++".

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Well, I guess I've found a reply of sorts here,

http://threadingbuildingblocks.org/codesamples.php

See the Conway's Game of Life example.

I've now loaded the above application into Visual C++and I think it's wrongly advertised.

It says it combines native C++ with managed C++/CLI but it doesn't. All files are /clr files which means they're managed. The TBB library is a template library so it will also be linkedas managed. There'snot a trace of native C++ at all in this application.

What you see here is the MS C++/CLI compiler's ability to handle just about anything. In my view this compiler must be the peak of compiler technology.Nothing of this has ever been accomplished before. I hope the people behind this get due credit.

So I will go for it and think it can also handle the native/managed situation as well too.

Leave a Comment

Please sign in to add a comment. Not a member? Join today