3

アプリケーションを 64 ビット実行可能ファイルとしてコンパイルするように DUB を構成するにはどうすればよいですか? これが私の 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 がインストールされています。

4

1 に答える 1