问题描述
我有一个C ++ dll,想用另一个C ++ dll包装,并调用第一个dll的函数.
我该如何包装?
问候,
Hi,
I have one C++ dll and want wrap that by another C++ dll and call functions of this first dll.
How I can wrap that?
Regards,
推荐答案
#include "dll1_exports.h"
然后像平常一样从dll2调用函数.
在dll1的链接选项中,您需要添加对dll2.lib的引用.如果您使用的是Visual Studio,请在解决方案资源管理器中右键单击"dll1"的项目,然后选择属性".导航到Linker-> Input.在其他依赖项"中,键入dll2.lib.
现在建立dll1.现在应该将它与dll2链接起来
Then call the functions from dll2 as you would normally do.
In the link options of dll1 you would need to add a reference to your dll2.lib. Provided you use Visual Studio, Right click on project of "dll1" in the Solution Explorer and select Properties. Navigate to Linker->Input. In the Additional Dependencies type dll2.lib.
Now build dll1. It should now be linked with dll2
这篇关于将C ++ dll包装在另一个C ++ dll中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!