Page 1 of 1

Possible linker error when compiling with SDL2?

Posted: Sat Jul 08, 2023 12:04 am
by ThatBenderGuy
I am pretty new to C/switch homebrew development and I was wanting to update a dead app for personal use on the latest fw. I fixed up deprecated/removed code and have no errors when compiling with make. My problem is (I believe) during the linker process when it attempts to build the binaries.

This is what gets spewed into my terminal (I see things like dwarf errors and undefined methods)
Terminal Output

And here is my makefile which I frankensteined from the original and the SDL2 example makefile
Makefile

I'm honestly stuck and not sure how to resolve this issue. Any help would be greatly appreciated :D

Re: Possible linker error when compiling with SDL2?

Posted: Sun Jul 16, 2023 1:17 pm
by WinterMute
It's difficult to say without seeing the complete project although there are some parts of that Makefile that are no longer relevant.

You could try just replacing the Makefile with a stock Makefile with only metadata & compile options edited, ignore exefs stuff & replace LIBS line with

Code: Select all

-/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-pkg-config --libs SDL2_ttf SDL2_gfx SDL2_image`
Try and fix any compile warnings if you can too.