Closed kargaroc closed 3 years ago
Ah, yeah. Sorry, I forgot to update the Makefile when updating the libvgm reference.
https://github.com/ValleyBell/SMPSPlay/blob/9e002e743c8a1bf077437fc684b7f7b12b6d95c2/Makefile#L92 There it needs to link against $(LIBPATH)/libvgm-utils.a as well. I'll push a fix later.
That doesn't actually help out when I do that
I finally found time to try it out on Linux ... and the solution above worked just fine. Can you elaborate on what's going when after adding libvgm-utils.a to the LIBS variable?
gcc obj/Engine/dac.o obj/Engine/necpcm.o obj/Engine/smps.o obj/Engine/smps_commands.o obj/Engine/smps_drums.o obj/Engine/smps_extra.o obj/ini_lib.o obj/loader_data.o obj/loader_def.o obj/loader_ini.o obj/loader_smps.o obj/main.o obj/Sound.o obj/vgmwrite.o libs/install/lib/libvgm-audio.a libs/install/lib/libvgm-utils.a libs/install/lib/libvgm-emu.a -lm -lrt -pthread -lasound -lao -o smpsplay
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Start':
AudDrv_Pulse.c:(.text+0x18e): undefined reference to `pa_simple_new'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x223): undefined reference to `pa_simple_free'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `PulseThread':
AudDrv_Pulse.c:(.text+0x2f3): undefined reference to `pa_simple_write'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_GetLatency':
AudDrv_Pulse.c:(.text+0x34b): undefined reference to `pa_simple_get_latency'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_WriteData':
AudDrv_Pulse.c:(.text+0x3f8): undefined reference to `pa_simple_write'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Stop':
AudDrv_Pulse.c:(.text+0x468): undefined reference to `pa_simple_free'
collect2: error: ld returned 1 exit status
make: *** [Makefile:122: smpsplay] Error 1
Ohh, I see you compiled libvgm with PulseAudio support. I'm afraid the Makefile for SMPSPlay doesn't take that into account. (libvgm didn't support PA when SMPSPlay was written and I don't have PA installed on my system.)
You will have to go into libs/build_GCC/libvgm/
, run ccmake
and turn the option AUDIODRV_PULSE off.
Then regenerate the project and run make install
in order to rebuild libvgm without PulseAudio.
After that you should be able to build SMPSPlay.
(If you want PulseAudio support, you need to modify the Makefile to link -lpulse -lpulse-simple
instead of rebuilding libvgm.)
Sorry for all the hassle. I'm afraid libvgm got a bit too complex for the simple Makefile that SMPSPlay uses currently.
fixed with fc33595a695f880311d3d793f9ac7e12ed7e65cd
As of 27f2a000053a5c4bb9204cd39ce162e1d78dffdb there is now a CMake project file. Thus you now can build libvgm with or without PulseAudio support and use the CMake project to build SMPSPlay and it should link properly.
When building on Linux, I get this