Can't compile my code
Gabz0r785897 opened this issue · 1 comments
#395 was my original post
The "tutorial" you linked to is really out of date, and teaches bad programming practices.
We provide an actual SDL2 example, with a Makefile you can copy to your project instead. Note how the recommended way of linking to SDL is way simpler:
LIBS := `sdl2-config --libs`
Originally posted by @fincs in #395 (comment)
Using the makefile that they provided, I'm still having a bit of a problem.
linking c8-master.elf
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/libnx/lib\libnx.a(switch_crt0.o): in function bss_loop': /home/fincs/pacman-packages/libnx/src/libnx-3.1.0/nx/source/runtime/switch_crt0.s:72: undefined reference to
main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /c/users/admin/downloads/c8-master/c8-master/c8-master.elf] Error 1
make: *** [Makefile:165: build] Error 2
I'm unsure why this is happening, and would really appreciate some help.
No need to make a new issue.