I've hit another small roadblock on my quest to port the Nintendo Switch NX library to Nim. I've finally got everything compiling to an elf file properly if I use:
nim c --os:nintendoswitch --cpu:armv8a57 libnx.nim
Bam, everything runs fine, it uses the correct compiler (aarch64-none-elf-gcc), and everything compiles up nicely.
However, if I take those switches and either put them in a nim.cfg or a config.nims file like so:
--os="nintendoswitch"
--cpu="armv8a57"
or
switch("os", "nintendoswitch")
switch("cpu", "armv8a57")
Then the compilation fails because it uses gcc as the compiler. Is this the same behavior if compiling to another OS? Am I doing something wrong with the nim config files?
I think, the configuration file has to have the same name as the nim file:
Either libnx.nim.cfg or linbx.nims.
@Arrrrrrrrr Directory structure is:
libnx.nims
libnx.nim
src/...
You mean a blog post on how I got the compiler to support the Nintendo Switch?