Homebrew Question Need some help getting the DevKitPro compilation environment setup

OkazakiTheOtaku

no thanks, I don't want a custom title
OP
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
Hi,

I'm trying to get into Switch homebrew development and while I've had some success getting the bare DevKitPro environment setup, I've hit a few hitches and can't find an answer.

On a few open source projects I'm trying to compile, I receive an SDL error, as so:
#include <SDL2/SDL.h>
no such file or directory

On a base level I know that I have to find a way to get the SDL package but I'm unsure how to do that.

When trying to compile Checkpoint I get the same thing, except it is
#include <ft2build.h>
not SDL.

I have experience programming and compiling, but I usually work with Obj-C and Swift on Xcode. I've never done anything like this.

I'm trying to set up the environment in a fresh Windows 10 VM, and I have DevKitPro and whatnot already installed. Thanks for the help!
 

XCJLongbow

Member
Newcomer
Joined
May 20, 2018
Messages
8
Trophies
0
Age
27
XP
100
Country
United States
Hi,

I'm trying to get into Switch homebrew development and while I've had some success getting the bare DevKitPro environment setup, I've hit a few hitches and can't find an answer.

On a few open source projects I'm trying to compile, I receive an SDL error, as so:
#include <SDL2/SDL.h>
no such file or directory

On a base level I know that I have to find a way to get the SDL package but I'm unsure how to do that.

When trying to compile Checkpoint I get the same thing, except it is
#include <ft2build.h>
not SDL.

I have experience programming and compiling, but I usually work with Obj-C and Swift on Xcode. I've never done anything like this.

I'm trying to set up the environment in a fresh Windows 10 VM, and I have DevKitPro and whatnot already installed. Thanks for the help!

You need to install the switch-sdl2 packages from the devkitPro pacman.

Instructions for that are available on the DKP/Switchbrew sites. (I can't post links)
 

OkazakiTheOtaku

no thanks, I don't want a custom title
OP
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan

XCJLongbow

Member
Newcomer
Joined
May 20, 2018
Messages
8
Trophies
0
Age
27
XP
100
Country
United States
I followed this guide
but it just installed DevKitPro, not the others.

You still have to install the individual packages.

sudo dkp-pacman -Sl

(That's a lowercase L)

Use that to list available packages, then use:

sudo dkp-pacman -S *

* being the package from the list you want. At minimum you'll want switch-sdl2, but I'd just install them all. They aren't exactly large.
 

OkazakiTheOtaku

no thanks, I don't want a custom title
OP
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
You still have to install the individual packages.

sudo dkp-pacman -Sl

(That's a lowercase L)

Use that to list available packages, then use:

sudo dkp-pacman -S *

* being the package from the list you want. At minimum you'll want switch-sdl2, but I'd just install them all. They aren't exactly large.
Thanks!
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,784
Trophies
1
Age
44
XP
6,509
Country
Germany
you can use c++ with SDL2. Also right now there aren't many switch homebrew libraries/library ports i know of that you can use c++ with. SDL2 seems to be the only one for now.
Coming from .NET I'm still not into all of that.
SDL2 is nothing Switch/Ninty specific but a general kind of library or framework which I can use to adress things like input/output (sound, display and so on) and with devkitpro and the sdl2 pacman package it is possible to compile a SDL2 C++ program into a NRO file?
 

ShroomKing

Somebody
Member
Joined
Mar 3, 2017
Messages
470
Trophies
0
Age
29
Location
in bed
XP
1,959
Country
United States
Coming from .NET I'm still not into all of that.
SDL2 is nothing Switch/Ninty specific but a general kind of library or framework which I can use to adress things like input/output (sound, display and so on) and with devkitpro and the sdl2 pacman package it is possible to compile a SDL2 C++ program into a NRO file?
Yeah. You better look at sources of SDL2 apps on the switch to see how you would use it. (check out postal-nx or Fireplace-NX on github, i think they are great examples)
 
  • Like
Reactions: lordelan

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs