Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1014685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:17:12+00:00 2026-05-16T10:17:12+00:00

I have a large program with several large DLL’s that are compiled with MFC

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:17:13+00:00Added an answer on May 16, 2026 at 10:17 am

    Unfortunately, the best solution to our problem was to include the offending code within a class.

    // Old Way
    static char *pSTRING_ONE = "STRING_ONE";
    

    New

    class CFieldDefs
    {
      public:
         static char *pSTRING_ONE;
    }
    
    char *CFieldDefs::pSTRING_ONE = "STRING_ONE";
    

    Usage:

    CFieldDefs:pSTRING_ONE;
    

    Even though the change was quite tedious, it greatly reduced the number of fieldRVA Entries CLR Fields within the DLL. Thanks for all your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a very large program where there is always a superview that just encompasses
I have a c++ program that uses several very large arrays of doubles, and
I have a large program that is working other then one .h file that
I have a Python program that executes a large MySQL statement. How do I
I have several large text text files that all have the same structure and
I have a fairly large program written in C. It spans several files, and
We have a java program that requires a large amount of heap space -
I have a Java program that reads in a large list of strings from
So I have this Java program that I use to munch through several terabytes
I have mpi program to distribute the large array amongst several processes on cluster.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.