: warning C4273: 'GetGameVersion' : inconsistent dll linkage. dllexport assumed. : warning C4273: 'GetGameDownloadPath' : inconsistent dll linkage. dllexport assumed.
reason:
warning C4273 means that you've probably "double declared" these (as the same type, but with different linkages). The compiler is assuming you meant to export them.
DLL 导出函数中有重载函数,我的工程中没有必要,所以将其中一个DownloadFile删除即可消除,但是还有 warning LNK4049:
另外一个主要的是类DownCoreApp定义已经将成员函数导出,两处文件导出,所以导致了warning LNK4049:
如果不想让人用这个类,让调用者直接调函数的话,将DownCoreApp定义前的DOWNNETSDK_API直接删除即可消除警告

本文探讨了DLL导出机制中常见的问题及其解决方案,包括如何避免函数重载引起的链接错误及类成员函数的正确导出方式。
5061

被折叠的 条评论
为什么被折叠?



