Hacking How do I compile this ds Homebrew?


Active Member
Sep 21, 2018
United States
I found this here on ask from a user asking if it was possible to re-write bootleg gba roms with a ds. I figure I should ask how to compile programs like these as I am finding more and more github pages that have only the source code and no compiled releases available.

If someone could also explain how to compile source code meant for windows platforms as well that would be dope.


Editorial Team
Nov 21, 2005
United Kingdom
The thing on github is often because they were exported from google code when that went pop and not always with the compiled versions. Might be worth then seeking those compiled versions from various places.

Anyway. The vast majority of DS homebrew, certainly anything you are likely to find on github, was made using the devkitpro/devkitarm setup
You can grab the current versions on
Current versions however is the where the problem starts.
There are many many versions of the devkitpro/devkitarm toolchain and the libnds library. Many of them mutually incompatible.
For reasons known only to themselves the devkitpro people really really really dislike old versions of it being shared (as in they fire of DMCA requests like nobody's business). It is actually quite a contentious issue in these circles.
This means you might either
1) Need to find said old version. Some are out there, and someone might still have one installed and be willing to compile it for you. Sadly no project to recreate whatever can be to work for 95% of things on newer stuff has got far.
2) Need to update the program to work with the new version. This changes the game from "if you can save the document as another format then you can probably compile it" to

Windows programs varies with what the Windows programs are made for. There are a thousand different things out there and despite many being nominally for the same language may still be incompatible.
As a quick overview there are maybe 6 major classes.

1) Microsoft development tools, modern edition. Visual studio is the name of the program here. There are paid versions and free.
For this you will tend to see things in addition to the .c/.cpp and .h files then extensions like vcprog. You will also possibly see c#/.net in this which is Microsoft's newer language (and actually quite nice, even if I don't want to use it for anything I still want to have available in 20 years).

2) Microsoft development tools, old school. Visual basic aka vb. Not to be confused with the modern language visualbasic.net which is a subset of C#. It is a horrible language but it is easy to pick up and do things with so there are a lot of simple, albeit crash happy, tools doing it for things in homebrew, flash cart, emulator and ROM hacking circles.

3) Open source development tools. The GNU compiler collection aka GCC being the main contender here. For Windows then probably a split between Cygwin and MinGW, if you have a Linux install then far easier to set up.
Some do however like http://www.codeblocks.org/ as it often solves the big problem of "I just want it to compile, don't want to have to learn what -Werror is" ( https://caiorss.github.io/C-Cpp-Notes/compiler-flags-options.html if you were curious).
While not a giveaway/requirement then seeing something called makefile in the directory is usually a sign of this one.

4) Python. A super popular scripting language that some have called the glue that holds modern computing together and I am not inclined to argue otherwise. Being scripting it is slower.
Various versions of this exist though mostly going to be the difference between 2 and 3 for this sort of thing. Anyway these will tend to have extensions like .py. Theoretically such things are cross platform but... reality tends to get in the way.

5) Java
Taught as the main language in a lot of programming schools (and these days fairly popular in a little thing called android). Thankfully it is not as common in ROM hacking, homebrew and such circles as it is for silly PC applications and the business world but is a thing.

6) Everything else and web browsers (some stuff will be based on php and such like).
Everything else can include some legacy tools (find yourself looking at PS1 era stuff and you might see Borland stuff) and scripting languages that were sort of maybe rivals to python but have dropped off -- perl, ruby, think I saw something written in Scheme once, Lua is popular among emulator crowds as the fancy tool assisted speedrun and debugging emulators often support it (does have a bit of a following in actual DS homebrew as well -- there are some lua runtimes on the DS that can be used to make actually worthwhile homebrew), one particularly horrid incident saw something written in pascal (it is "popular" in some science fields so I think the one that did it learned it for that) and I am sure we could find all the other academic programming languages represented too.

Of course none of this says anything about having to find libraries (or specific versions thereof), possibly finding modern windows does not care for what you are doing (when I were a lad... actually that was still DOS but later c:\program files, or c:\progra~1, used to usually house my save games and program settings. Today you would be asked to give your program admin/click through UAC if you did that and your virus software might even poke its nose in to ask what is going on) and all the other things that serve to trip people up here. That said if you rock up somewhere saying "I tried this, here are my error messages, mind pointing me in the right direction?" then that gets you further than "help me".

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: hb. But wash your hands before coming back :) js