Page 1 of 1

Nintendo Switch SDL2 Errors

Posted: Sat May 19, 2018 11:18 am
by Father Of Egg
When I try to run make, it outputs:

Code: Select all

linking gdkGBA-master.elf
C:/devkitPro/portlibs/switch/lib\libSDL2.a(SDL_systhread.o): In function `SDL_ThreadID':
/home/davem/projects/devkitpro/pacman-packages/switch/SDL2/src/SDL2-2.0.8/src/thread/switch/SDL_systhread.c:66: undefined reference to `svcGetThreadId'
C:/devkitPro/portlibs/switch/lib\libSDL2.a(SDL_systhread.o): In function `SDL_SYS_SetThreadPriority':
/home/davem/projects/devkitpro/pacman-packages/switch/SDL2/src/SDL2-2.0.8/src/thread/switch/SDL_systhread.c:97: undefined reference to `svcSetThreadPriority'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro//libnx/switch_rules:52: /opt/devkitpro/msys2/gdkGBA-master/gdkGBA-master.elf] Error 1
make: *** [Makefile:152: build] Error 2
I must've been oblivious and done something wrong. Thank you.

Re: Nintendo Switch SDL2 Errors

Posted: Sun May 20, 2018 3:24 am
by WinterMute
It's hard to know without seeing your code but I suspect you have the wrong order for your LIBS line. libnx should be listed last.

It would be much better if you din't put your code inside the devkitpro folder & most especially not inside the msys folder there. Preferably use a projects folder in your home directory.