Mess in C ++ / CLI mixed builds

Is there a way to hide local placeholder definitions from managed metadata (visible in Reflector)?

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

I use boost and MFC only in my own code, but boost / MFC headers should still be # included in the managed code files. As soon as this is done (regardless of whether they are in the unmanaged #pragma block or not), all namespaces and class names (although they have no real implementation) from boost and ATL (aka MFC) are displayed in the Reflector view of the assembly.

This is not a serious problem (after all, it still works fine), but it seems like a mess, and I would prefer it not to be. Is there any way to get rid of it?

+3
source share
1 answer

There is no way to get rid of it.

The idea with C ++ / CLI is that managed code should have access to unmanaged code. The only way to do this is to create a managed shell for all C ++ functions.

I tried "function level binding" and "optimizing the entire program", but did not reduce the number of characters exported.

0
source

Source: https://habr.com/ru/post/1720849/


All Articles