gpt4 book ai didi

c++ - 为 64 位编译 Microsoft Detours

转载 作者:可可西里 更新时间:2023-11-01 09:19:02 29 4
gpt4 key购买 nike

detours包声称支持 64 位 但我没有看到编译 64 位 二进制文件的方法:

Detouring 32-bit and 64-bit Processes

使用nmake all 只编译32 位 东西:

>dir
Volume in drive D is Volume
Volume Serial Number is XXXX-XXXX

Directory of D:\Detours

06/21/2018 03:46 PM <DIR> .
06/21/2018 03:46 PM <DIR> ..
06/23/2018 08:13 PM <DIR> bin.X86
06/20/2017 09:03 AM 5,105 CREDITS.TXT
06/22/2017 03:06 PM 31 Detours Version 3.0 Build_343
10/19/2016 12:06 PM 113,685 Detours.chm
06/23/2018 08:12 PM <DIR> include
06/23/2018 08:12 PM <DIR> lib.X86
10/29/2015 02:19 PM 7,144 LICENSE.RTF
12/21/2016 01:22 PM 1,851 Makefile
06/22/2017 03:06 PM 14,961 README.TXT
06/21/2018 03:04 PM <DIR> samples
06/23/2018 08:12 PM <DIR> src
10/29/2015 02:19 PM 4,841 system.mak
06/22/2017 03:06 PM 31 VERSION.TXT

nmake size64 命令无效。

如果我在我的 Visual Studio C++ 项目中使用库(lib.X86 文件夹),该项目配置为生成 64 位 DLL,我得到相应的错误并且无法构建:

library machine type 'x86' conflicts with target machine type 'x64'

将文件夹 lib.X86 重命名为 lib.X64 也不起作用。

我怎样才能让它在 64 位 环境中工作,还是不可能?

最佳答案

It seems like you have to set the target processor to 64-bit and then compile .工作批处理 (.bat) 脚本可能类似于以下内容(取决于您的 Visual Studio 安装):

SET DETOURS_TARGET_PROCESSOR=X64
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
NMAKE

这样,64 位 二进制文件应该可以成功编译。

关于c++ - 为 64 位编译 Microsoft Detours,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51004020/

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