在VS2005中将DLL添加到VC ++项目 [英] Adding DLL to VC++ project in vs2005

查看:112
本文介绍了在VS2005中将DLL添加到VC ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在visuval Studio 2005(vs2005)中使用win32创建了一个dll,并使用vs2005在WIN32中创建了一个使用该dll的应用程序.当我在项目中添加该dll并尝试运行时,我收到一条错误消息,提示未找到dll中的头文件.如何解决该错误.?请提前告知我.谢谢.

解决方案


我认为本文将帮助您分步操作:从VC ++和VB调用C ++ DLL-第1部分 [ ^ ]


我怀疑您实际上正在收到此消息-也许您可以在项目的编译中(而不是在运行它时)向问题中添加详细信息.所需的头文件是您作为DLL源代码的一部分创建的头文件,因此您需要将其添加到项目中,以便编译器了解如何编译对DLL中例程的任何函数调用. /blockquote>

在dll中没有头文件...头文件应该在您的源文件中,并应指定dll中项目的原型或类说明.


Hi,

I created a dll using win32 in visuval studio 2005(vs2005) and I created a application to use that dll in WIN32 using vs2005. When i add that dll in my project and try to run I am getting an error saying that an header file that is in dll is not found. How to resolve the error.?Please let me know?Thanks in advance.

解决方案

Hi,
I think this article would help you Step by Step: Calling C++ DLLs from VC++ and VB - Part 1[^]


I suspect that you are actually getting this message - perhaps you could add the detail to your question - in the compile of your project, rather than when you run it. The header file that is required is the one you created as part of the source code for your DLL, so you need to add it to the project in order that the compiler understands how to compile any function calls to the routines in the DLL.


There is no such thing as a header file IN a dll... the header file should be in your source and should specify the prototypes or class descriptions of items in dll.


这篇关于在VS2005中将DLL添加到VC ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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