gtoal / pitrex

Support for driving Vectrex display from Raspberry Pi Zero WH
29 stars 7 forks source link

When building Linux examples, they fail. #9

Open mwedmark opened 1 month ago

mwedmark commented 1 month ago

It seems that after installing SDL and trying to build, some examples fails to build with missing functions error (see below). Should the rest of the examples still work if started manually via SSH?

-snip- Building for PiTrex under Linux on Pi0 gcc -W -Wall -s -Ofast -DSETTINGS_DIR="\"/opt/pitrex/share/vmmenu/\"" -DSND_DIR="\"/opt/pitrex/share/vmmenu/VMMsnd\"" -I../pitrex/ -DPITREX -DPIZERO -DRPI0 -o vmmenu sdl2-config --libs -lSDL2 -lSDL2_mixer -lm obj/vmmenu.o obj/graphics.o obj/window.o obj/timer.o obj/iniparser.o obj/dictionary.o obj/LinuxVMM.o obj/VMM-SDL.o obj/vchars.o obj/gamelist.o obj/editlist.o \ ../pitrex/pitrex/build.raspbian/bcm2835.o \ ../pitrex/pitrex/build.raspbian/pitrexio-gpio.o \ ../pitrex/vectrex/build.raspbian/vectrexInterface.o \ ../pitrex/vectrex/build.raspbian/osWrapper.o \ ../pitrex/vectrex/build.raspbian/baremetalUtil.o /usr/bin/ld: obj/vmmenu.o: in function PrintString.constprop.1': vmmenu.c:(.text+0x1c4): undefined reference tosincos' /usr/bin/ld: obj/vmmenu.o: in function PrintString.constprop.2': vmmenu.c:(.text+0x3e0): undefined reference tosincos' /usr/bin/ld: obj/vmmenu.o: in function PrintString': vmmenu.c:(.text+0x608): undefined reference tosincos' /usr/bin/ld: vmmenu.c:(.text+0x6d0): undefined reference to sincos' /usr/bin/ld: obj/vmmenu.o: in functionfnrotate': vmmenu.c:(.text+0x814): undefined reference to sincos' /usr/bin/ld: obj/vmmenu.o:vmmenu.c:(.text+0x8d8): more undefined references tosincos' follow /usr/bin/ld: obj/vmmenu.o: in function EditGamesList': vmmenu.c:(.text+0x4960): undefined reference tosin' /usr/bin/ld: obj/vmmenu.o: in function main': vmmenu.c:(.text.startup+0xab4): undefined reference tocos' /usr/bin/ld: obj/VMM-SDL.o: in function InitialiseSDL': VMM-SDL.c:(.text+0xb8): undefined reference toSDL_Init' /usr/bin/ld: VMM-SDL.c:(.text+0x100): undefined reference to `SDL_CreateWindow' -snip-

gtoal commented 1 month ago

I don't currently have a clean copy of what's on github installed on a pi but give me a little time to recreate the environment and I'll check this out. From a quick glance, I have a vague recollection that '-lm' has to be the last item on the command line.