dub cross compilation binary extension

Andre Pany andre at s-e-a-p.de
Tue Sep 26 17:48:06 UTC 2017


Hi,

I had set up a cross compilation from Windows to Raspberry Pi 
using LDC and GCC toolchain. Almost everything is working fine. 
Dub creates a binary which is runnable on the Raspberry Pi. There 
is only 1 small issue. Dub creates the executable with the 
windows file extension ".exe".
Is there anything I can do to force dub not to include the 
windows file extension?

dub.json
{
	"name": "test",
	"dflags-ldc": ["-mtriple=arm-linux-gnueabihf", 
"-gcc=arm-linux-gnueabihf-gcc"],
	"lflags-ldc": 
["-LC:\\D\\ldc2-1.4.0-beta1-win32-msvc\\bin\\ldc-build-runtime.tmp\\lib\\"]
}

dub build --compiler=ldc2 -v

My current workaround is to have a batch file which renames the 
file automatically. But I want to write a blog post and this 
workaround looks ugly.

Kind regards
André


More information about the Digitalmars-d-learn mailing list