swap classes that need /clr out to dll

B

bonk

I have a set of unmanaged c++ classes that internally need to use
managed classes (WPF formerly know as "Avalon") but I do not want to
compile the whole MFC project with the /clr switch. What options do I
have in that case? Could I
a) swap out all the classes that need to use managed classes into its
own dll and compile ONLY that one with the /clr switch ?
b) compile the whole project with the /clr switch but force certain
classes not to compile to managed code ?

Is both possible ? Ifg sou you could you give me some hints on how to do
it ? Do you see any other options ?
 
M

Marcus Heege

There is no need to split the project. You can choose /clr on a file-by-file
basis. As a starting point, I would compile only the files that need managed
libraries with /clr.

However, you should define 2 precompiled headers: One that is generated with
/clr and one without.
The one that is generated with /clr should be included by the files that are
compiled with /clr.

Since it is a very early stage in the product, there can still be other
issues I currently don't see. It would be very nice if you could tell me
further problems you face either via list list or privately
([email protected])

TIA Marcus Heege
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top