【问题标题】:How can I use the IntelliProtector API in a win32 DLL program如何在 win32 DLL 程序中使用 IntelliProtector API
【发布时间】:2011-07-19 21:15:39
【问题描述】:

我是 DLL 的初学者。我开发了我想用the IntelliProtector API 保护的软件。

我的问题是:如何将这样的库/源代码(无论您如何称呼)包含到我的软件中并对其进行编译?我已将文件添加到我的项目中,然后出现了一些与 MFC dll 相关的错误。我用 Google 搜索并将设置更改为共享 MFC dll。

fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

一旦我改变了它,我现在得到这个错误:

fatal error LNK1169: one or more multiply defined symbols found

我认为这是由 2 个入口点引起的?我真的无法弄清楚这一点。任何帮助将不胜感激。

我收到以下错误:

1>mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in dllmain.obj
1>E:\software\PokerLog\Debug\Poker.dll : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build FAILED.

【问题讨论】:

  • 不要让我们猜测错误信息。
  • 什么意思?我粘贴的那些错误就是我得到的。我的 dll 使用一些 windows.h 包含,而 intelliprotector 使用 stdafx 如果有帮助
  • 什么标识符是多重定义的?它们与您的代码有何关系?
  • 好的,抱歉,我刚刚编辑了正确的错误粘贴,对此感到抱歉

标签: c++ winapi dll


【解决方案1】:

如果 dllmain 是您的代码并且您不需要处理 DLL_THREAD_ATTACH 和 DLL_THREAD_DETACH,那么您可能希望摆脱 DllMain 并将代码移动到 CWinApp 派生类的 InitInstance/ExitInstance。或者,您可以尝试使用链接器选项 /FORCE:MULTIPLE。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多