构造函数重载类获取链接器错误使用DLL? [英] constructor overloading Class get Linker Error Using DLL?

查看:256
本文介绍了构造函数重载类获取链接器错误使用DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了动态链接到MFC的常规DLL。
在之前构建dll在dll项目我使用添加另一个类。这个类提供了更多的构造器重载方法。
然后我构建dll成功后,我使用这个lib和dll文件包含项目,然后去构建和获取链接器错误时使用构造函数重载类

I have created Regular DLLs Dynamically Linked to MFC. in before build dll in dll project i used add another class. this class provide more method of constructor overloading. Then I build dll successfully after i used this lib and dll file include project and then go to build and get linker error when using constructor overloading class

我的类名称:对象

Error   11  error LNK2001: unresolved external symbol "public: __thiscall AvinashiAMF::Object::~Object(void)" (??1Object@AvinashiAMF@@QAE@XZ)   BuleCappServiceUseDynamicDllDlg.obj

Error   10  error LNK2001: unresolved external symbol "public: __thiscall AvinashiAMF::Object::Object(enum AvinashiAMF::ObjectType,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Object@AvinashiAMF@@QAE@W4ObjectType@1@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)   BuleCappServiceUseDynamicDllDlg.obj

Error   12  fatal error LNK1120: 2 unresolved externals D:\Test Aplications\Visual Studio 2008\Projects\BuleCappServiceUseDynamicDll\Release\BuleCappServiceUseDynamicDll.exe


推荐答案

您可能无法导出课程。请参阅 http://msdn.microsoft.com/en-us/library/81h27t8c .aspx

You're probably not exporting your class. See here http://msdn.microsoft.com/en-us/library/81h27t8c.aspx

此外,检查这种问题的一个不错的工具是depends.exe,包括在Visual Studio中,它允许您检查导出和导入的符号。

Also, a nice tool to check for this kind of issues is depends.exe, included with Visual Studio, which allows you to check for exported and imported symbols.

这篇关于构造函数重载类获取链接器错误使用DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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