gpt4 book ai didi

c++ - 如何在 win32 DLL 程序中使用 IntelliProtector API

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:01:37 26 4
gpt4 key购买 nike

在 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.

最佳答案

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

关于c++ - 如何在 win32 DLL 程序中使用 IntelliProtector API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5381516/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com