fatal error LNK1179 
Author Message
 fatal error LNK1179

I'm using STL in an ATL project and am getting the link error 1179.  I
belive the problem stems from me storing pointers to MS smart pointers
in lists.

If I have a COM interface IMyInterface:

// list of interfaces to dynamically created objects
typedef std::list<IMyIntefacePtr*> interfaceList;

// maps a string to dynamically created object lists
typedef std::map<std::string, interfaceList*> listMap;

// maps dynamically created object maps to another identifier
typedef std::map<long, listMap*> dataMap;

dataMap allData;  // commenting out this line eliminates the error

From the documentation for error LNK1179:
One possible cause is if you use the /H option with /Gy. The /H option
limits the length of external names, and the /Gy option packages
functions in COMDATs.

I'm not using either of these options.  My guess is that because
IMyInterfacePtr expands to a very long symbol containing CLSIDs, the
linker can't handle the heirarchy.  I can get around the linker error by
declaring the following typedef as opposed to that mentioned above:

typedef std::map<long, void*> dataMap;

but I'd rather not.  Does anyone have any experience with a situation
similar to this and/or have any suggestions? I can't find anything other
than the description of the error in the VC++ documentation

Thanks.

==================================================================
Doug Reese



Tue, 30 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. fatal error LNK1179: invalid or corrupt file

2. LNK1179 error

3. LNK1179 error

4. LNK1179 error problem

5. Linker error LNK1179 -- what's a COMDAT?

6. Linker error LNK1179 -- what's a COMDAT?

7. Linker error LNK1179 -- what's a COMDAT?

8. fatal error C1001: INTERNAL COMPILER ERROR

9. fatal error C1001: INTERNAL COMPILER ERROR

10. fatal error C1001: INTERNAL COMPILER ERROR

11. fatal error C1001: INTERNAL COMPILER ERROR

12. fatal error C1001: INTERNAL COMPILER ERROR

 

 
Powered by phpBB® Forum Software