/CLR and Packing issues

It seems that one cannot build a .net project in VC++ that uses anything other than default structure alignment  - in VS2005.  After some trial and questioning I found that out and now my VC++ web service does compile and all the link errors are gone except for 1 new one.  That one is about a missing extern called _CorDllMain.  I need to know what that is about as I cannot find anything in help on it.

Also, it seems that changing packing to 8 will cause me problems, even if I do get the project to link.  This is a mixed mode project, managed and unmanaged code, that uses /clr:Oldsyntax, and it accesses an existing DLL that uses packing of 1.  Won't there be a problem when the code in the web service attempts to make calls to that DLL

Why is there a requirement to use default packing anyway

Russ




Answer this question

/CLR and Packing issues

  • PaNuK

    you must also link to mscoree.lib

    I think the packing requirement is because some Windows API structures such as TEXTMETRIC are unfortunately sensitive to packing. 


  • /CLR and Packing issues