Click here to Skip to main content
15,907,492 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Any one would tell me what to do?

Compiler Error:
C3174: module attribute was not specified
fatal error LNK1250: failed to merge IDL content

Environment:
VS2005/C++

Detailed Story:
The company has a Win32 console app developed to access a USB device. My task is to
build an ATL/COM dll, using the same customed libraries used by that Win32 console app, to provide functional APIs to client SW. I started off with an empty shell ATL/COM dll and that compiled successfully. But as soon as I #include a .h header from that customed libraries, the compiler complains with C3174 and LNK1250.

I thought the IDL compiler did not like any header file from that set of customed libraries. So, I wrapped them in the form of a static Win32 library which hides
those header files from the ATL/COM module. The compilation of the static library went well. But as soon as I link it to my ATL/COM dll, the compiler error message shows up again.

Why do I chose to provide an ATL/COM dll rather than a regular library to the client? Because the client is a .NET/managed/C# and my piece is an unmanaged/C++.

What puzzle me are:

1. The said customed libraries header files have some GUID definitions. Does that cause compiler error?
2. That customed libraries should not be COM modules. The way they were used by the Win32 console app does not look like being COM modules at all.

I am seeking help from ATL/COM expertise!
THANK YOU in advance.
Posted
Comments
Mohibur Rashid 22-Aug-11 2:47am    
Make sure you have added all the required library, that you have created.

1 solution

Google says: http://msdn.microsoft.com/en-us/library/5cbw7we0(v=vs.80).aspx[^]

you missed a dll statement?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900