I have a large program with several large DLL's that are compiled with MFC and /clr. There is a limit of 65535 global FieldRVA entries in an assembly. If it is more the loader raises an exception. I already have Enable String Pooling (/GF).
I have alot of code like:
static char *pSTRING_ONE = "STRING_ONE";
if I compile witha macro such as:
#define pSTRING_ONE "STRING_ONE"
it greatly reduces string for the CLR meta data so I compile but then I gain all of the problems of using a #define
.
The question is: Is there another alternative to changing the static char * -> #define ?