How do I increase the allowed decorated name length in VC9 (MSVC 2008)?

◇◆丶佛笑我妖孽 提交于 2019-12-02 06:28:27

Since there does not appear to be a way to increase the compiler's internal limitation on the decorated name length, I bit the bullet and made the change suggested in the MSDN. see: http://msdn.microsoft.com/en-us/library/074af4b6.aspx

I only had to change the first typedef to a struct. This required about 200 other changes in legacy code, which was tedious, but otherwise not difficult. However, I will be spending the next week or so in regression testing to make sure this did not screw something up.

Here is the basic change: (note that I was forced to add some ctors to the struct)

enum Type{
    TYPE_COUNT,
    TYPE_VALUE
 };

 struct Containers 
 {
    MyVector<Container*, CriticalSectionLock > Element;
    Containers(int num, Container* elem):Element(num, elem){}
    Containers(){}
 };
 typedef MyVector< MyClassType*, CriticalSectionLock >::const_iterator  const_iterator_type;
 typedef MyVector< stl::pair< string, Type > >::const_iterator const_iterator_def;
 typedef MyVector< Container** >::const_iterator const_iterator_container;
 typedef MyVector< stl::pair < MyBase*, MyVector< stl::pair< Container**, Containers* > > > >::const_iterator const_iterator;
#pragma warning(disable:xxx).

Life's too short man.

@Roel: As I mentioned in the original posting: "The generated LIB file will not properly link to other modules in the project."

IOW, this is more than just a 'warning'. It causes the project NOT TO WORK.

My posted fix is somewhat difficult and tedious to completely implement, but it does work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!