Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building Linux examples, they fail. #9

Open
mwedmark opened this issue Aug 8, 2024 · 1 comment
Open

When building Linux examples, they fail. #9

mwedmark opened this issue Aug 8, 2024 · 1 comment
Assignees

Comments

@mwedmark
Copy link

mwedmark commented Aug 8, 2024

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 to sincos'
/usr/bin/ld: obj/vmmenu.o: in function PrintString.constprop.2': vmmenu.c:(.text+0x3e0): undefined reference to sincos'
/usr/bin/ld: obj/vmmenu.o: in function PrintString': vmmenu.c:(.text+0x608): undefined reference to sincos'
/usr/bin/ld: vmmenu.c:(.text+0x6d0): undefined reference to sincos' /usr/bin/ld: obj/vmmenu.o: in function fnrotate':
vmmenu.c:(.text+0x814): undefined reference to sincos' /usr/bin/ld: obj/vmmenu.o:vmmenu.c:(.text+0x8d8): more undefined references to sincos' follow
/usr/bin/ld: obj/vmmenu.o: in function EditGamesList': vmmenu.c:(.text+0x4960): undefined reference to sin'
/usr/bin/ld: obj/vmmenu.o: in function main': vmmenu.c:(.text.startup+0xab4): undefined reference to cos'
/usr/bin/ld: obj/VMM-SDL.o: in function InitialiseSDL': VMM-SDL.c:(.text+0xb8): undefined reference to SDL_Init'
/usr/bin/ld: VMM-SDL.c:(.text+0x100): undefined reference to `SDL_CreateWindow'
-snip-

@gtoal
Copy link
Owner

gtoal commented Aug 8, 2024

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.

@gtoal gtoal self-assigned this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants