在C3174&上寻求帮助LNK1250 [英] Seeking help on C3174 & LNK1250

查看:124
本文介绍了在C3174&上寻求帮助LNK1250的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人会告诉我该怎么做吗?

编译器错误:
C3174:未指定模块属性
致命错误LNK1250:无法合并IDL内容

环境:
VS2005/C ++

详细的故事:
该公司开发了Win32控制台应用程序,用于访问USB设备.我的任务是
使用该Win32控制台应用程序使用的相同的自定义库来构建ATL/COM dll,以向客户端软件提供功能性API.我从一个空的Shell ATL/COM dll开始,并且编译成功.但是,一旦我#include了来自自定义库的.h头文件,编译器就会抱怨C3174和LNK1250.

我认为IDL编译器不喜欢该组自定义库中的任何头文件.因此,我将它们包装成隐藏了静态Win32库的形式
那些来自ATL/COM模块的头文件.静态库的编译进展顺利.但是,一旦我将其链接到我的ATL/COM dll,就会再次出现编译器错误消息.

为什么我选择向客户端提供ATL/COM dll而不是常规库?因为客户端是.NET/托管/C#,而我的作品是非托管/C ++.

我感到困惑的是:

1.所述定制库头文件具有一些GUID定义.这会导致编译器错误吗?
2.定制的库不应是COM模块. Win32控制台应用程序使用它们的方式根本不像是COM模块.

我正在寻求ATL/COM专业知识的帮助!
提前谢谢您.

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.

推荐答案

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

you missed a dll statement?


这篇关于在C3174&上寻求帮助LNK1250的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆