views:

162

answers:

1

Is there any way to hide native placeholder definitions from the managed metadata (visible in Reflector)?

I'm creating a mixed-mode C++/CLI assembly containing some files compiled with /clr and some compiled without.

I'm using boost and MFC in the native code only, but the boost/MFC headers still need to be #included into the managed code files. As soon as this is done (regardless of whether they're in a #pragma unmanaged block or not) all of the namespaces and class names (though no actual implementation) from boost and ATL (aka MFC) appear in the Reflector view of the assembly.

This is not a serious problem (after all, stuff still works fine), but it seems like clutter and I'd rather it wasn't there. Is there any way to get rid of it?

A: 

No there is no way to get rid of it.

The idea with C++/CLI is that the managed code should be able to access unmanaged code. The only way to do that is create a managed wrapper for all C++ functions.

I tried "function level linking" and "whole program optimization" but it did not reduce the number of symbols exported.

Arve