Skip to content

Setup SGDK with QtCreator

Stephane Dallongeville edited this page Mar 12, 2021 · 4 revisions

Here's how setup SGDK with QtCreator

  1. Download Qt from www.qt.io/download-open-source/
  2. Install QtCreator. The QtCreator checkbox is mandatory; you do not need any of the optional Qt components the installer suggests.
  3. First, open the project, by selecting File › New File or Project..., then Import Project › Import Existing Project › Choose....

  4. Choose a directory to keep your source code in (create one if you haven't already done so), and give the project a name for QtCreator to call it. Click Next.
  5. QtCreator will show a list of all the files currently in your project. (If you haven't yet added any files, none will be shown.) Click Next.
  6. QtCreator will show a summary of the files that will be added. Click Finish.
  7. You can add new source code to the project by right-clicking on the project root and choosing Add new... or Add Existing Files... If creating a new file, note that QtCreator has no C-specific templates, but the C++ source/header file templates are suitable for C code as well.
  8. To tell QtCreator where the SGDK headers are, add a line to the .includes file that was automatically created with your SGDK directory (with forward slashes for path separators).
  9. Choose the Projects tab on the left.
  10. Expand the Build Environment section by pressing Details ▼ button. On the right, click Add. Set the name of the new variable to GDK, and its value to the location where you extracted the SGDK to (with forward slashes).
  11. Change the Build Steps and Clean Steps: Set the executable to SGDK_PATH/bin/make.exe, and the arguments to -f SGDK_PATH/makefile.gen where SGDK_PATH refer to your SGDK installation path. For the Build Steps, untick all the targets; for the Clean Steps, leave Clean ticked.
  12. Build the project by pressing the hammer in the bottom-left. It should build successfully and create out/rom.bin in your project root.