On Wednesday, 9 March 2016 at 00:34:44 UTC, TheGag96 wrote:
Hi guys, for a possibly-in-over-my-head project I'd like to get
working a simple "Hello World" type program in which I call a D
function from C in a 3DS homebrew app (or maybe even have it
all in plain D with bindings to libctru). The thing is, I'm not
skilled with Makefiles so I don't have a clue on how to
correctly set up the toolchain for linking everything. I can
compile some D-calling C code just fine with dmd and gcc on
Linux (though I can't get anything working with gdc for
whatever reason). Would anyone be able to point me in the right
direction?
This is the example Makefile for a 3DS homebrew app:
http://pastebin.com/fcJrrMg9 It seems like there would be
issues differentiating the .d build definition files from D
source files...
Thanks!
Hmm.
I apologise that this post is not in any logical order.
dmd can only compile for x86 so you will have to use ldc or gdc
makefiles are generally not used in d. you should be able to use
the dub project settings file (dub.json or dub.sdl) to do most of
the standard linking, as for some of the deeper magic I'm not
sure.
versioning: i'm not sure that d has a 3ds target version but it
has
an arm one. includes should not be an issue.
If you cannot find bindings for ctru see if dstep can do it for
you.
I don't know what .v.pica or .shlist files are but you can use
string imports to reference the data looks like the same idea
can be used for the shader rule. However you may need to use a
prehook
script to call whatever "picassso" does first.