如何配置 DUB 以将我的应用程序编译为 64 位可执行文件?这是我的 dub.json:
{
"name": "dvulkanbase",
"targetType": "executable",
"description": "Vulkan boilerplate",
"authors": ["Myself"],
"homepage": "http://something",
"license": "MIT"
}
我尝试将此行添加到 dub.json:
"dflags-dmd": ["-m64"]
但随后dub build
输出:
## Warning for package dvulkanbase ##
The following compiler flags have been specified in the package description
file. They are handled by DUB and direct use in packages is discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:
-m64: Use --arch=x86/--arch=x86_64/--arch=x86_mscoff to specify the target architecture
Performing "debug" build using dmd for x86.
所以我尝试用以下内容替换该行:
"dflags-dmd": ["--arch=x86_64"]
但收到此错误:
Error: unrecognized switch '--arch=x86_64'
我在 Windows 10 上,安装了 DMD 2.074.0 和 Visual Studio 2015 和 2017。