LNK1179 error 
Author Message
 LNK1179 error

I made three com components by ATL(COM1, COM2, COM3). In
the COM3 I need to use some of the objects from COM1 and
COM2, so I imported the COM1 and COM2 idls to COM3 idl
file and I didn't have problem to compile and register my
COM3.

The problem is when I import all three of them to my MFC
application, I always get the error message when compile:

"fatal error LNK1179: invalid or corrupt file: duplicate
comdat "...(one of the IID from my COM2)"".

If I only import COM1 and COM2, there is no propblem. Here
is what I did my import in StsAfx.h:

#ifdef _DEBUG
#import "...(path)\debugu\COM1.dll" named_guids
#import "...(path)\debugu\COM2.dll" named_guids
#import "...(path)\debugu\COM3.dll" named_guids
#else
#import "...(path)\releaseumindependency\COM1.dll"
named_guids
#import "...(path)\releaseumindependency\COM2.dll"
named_guids
#import "...(path)\releaseumindependency\COM3.dll"
named_guids
#endif

Anyone has idea? Please help.

Thanks a lot.

________________

Linda Chen



Mon, 12 Jul 2004 01:33:43 GMT  
 LNK1179 error
In addition to import, you must also importlib() the corresponding type
libraries in in the library section of your COM3's IDL file.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> I made three com components by ATL(COM1, COM2, COM3). In
> the COM3 I need to use some of the objects from COM1 and
> COM2, so I imported the COM1 and COM2 idls to COM3 idl
> file and I didn't have problem to compile and register my
> COM3.

> The problem is when I import all three of them to my MFC
> application, I always get the error message when compile:

> "fatal error LNK1179: invalid or corrupt file: duplicate
> comdat "...(one of the IID from my COM2)"".

> If I only import COM1 and COM2, there is no propblem. Here
> is what I did my import in StsAfx.h:

> #ifdef _DEBUG
> #import "...(path)\debugu\COM1.dll" named_guids
> #import "...(path)\debugu\COM2.dll" named_guids
> #import "...(path)\debugu\COM3.dll" named_guids
> #else
> #import "...(path)\releaseumindependency\COM1.dll"
> named_guids
> #import "...(path)\releaseumindependency\COM2.dll"
> named_guids
> #import "...(path)\releaseumindependency\COM3.dll"
> named_guids
> #endif

> Anyone has idea? Please help.

> Thanks a lot.

> ________________

> Linda Chen



Mon, 12 Jul 2004 03:31:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. LNK1179 error

2. LNK1179 error problem

3. fatal error LNK1179: invalid or corrupt file

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

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

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

7. fatal error LNK1179

8. LNK1179 : duplicate COMDAT

9. LNK1179 - Compiler bug?

10. LNK1179 invalid or corrupt comdat HELP !!!

11. LNK1179

12. error, error, error !!!

 

 
Powered by phpBB® Forum Software