pinmame
pinmame copied to clipboard
BASS link failure trying to build Win32/x64 targets in VS2022 on Arm
I'm getting back to some PinMAME hacking, outside of Visual Pinball. To get started, I pulled the master branch, used the create_vc2022_from_vc2012.bat script to create the solution file, and then opened it in a fresh install of Visual Studio 2022 Community Edition.
Note that I have not installed anything else outside of the Visual Studio installer, other than NASM (is this still even a requirement?).
I'm currently getting the following linking errors:
1>altsound_data.obj : error LNK2019: unresolved external symbol BASS_ErrorGetCode referenced in function "char const * __cdecl get_bass_err(void)" (?get_bass_err@@YAPEBDXZ)
1>altsound_processor.obj : error LNK2019: unresolved external symbol BASS_ChannelIsActive referenced in function "private: static void __cdecl AltsoundProcessor::jingle_callback(unsigned long,unsigned long,unsigned long,void *)" (?jingle_callback@AltsoundProcessor@@CAXKKKPEAX@Z)
1>gsound_processor.obj : error LNK2001: unresolved external symbol BASS_ChannelIsActive
1>snd_alt.obj : error LNK2001: unresolved external symbol BASS_ChannelIsActive
1>altsound_processor.obj : error LNK2019: unresolved external symbol BASS_ChannelPlay referenced in function "public: virtual bool __cdecl AltsoundProcessor::handleCmd(unsigned int)" (?handleCmd@AltsoundProcessor@@UEAA_NI@Z)
1>gsound_processor.obj : error LNK2001: unresolved external symbol BASS_ChannelPlay
1>snd_alt.obj : error LNK2001: unresolved external symbol BASS_ChannelPlay
1>altsound_processor.obj : error LNK2019: unresolved external symbol BASS_ChannelPause referenced in function "private: bool __cdecl AltsoundProcessor::process_jingle(struct _stream_info *)" (?process_jingle@AltsoundProcessor@@AEAA_NPEAU_stream_info@@@Z)
1>gsound_processor.obj : error LNK2001: unresolved external symbol BASS_ChannelPause
1>snd_alt.obj : error LNK2001: unresolved external symbol BASS_ChannelPause
1>altsound_processor_base.obj : error LNK2019: unresolved external symbol BASS_StreamCreateFile referenced in function "protected: bool __cdecl AltsoundProcessorBase::createStream(void *,struct _stream_info *)" (?createStream@AltsoundProcessorBase@@IEAA_NPEAXPEAU_stream_info@@@Z)
1>altsound_processor_base.obj : error LNK2019: unresolved external symbol BASS_StreamFree referenced in function "protected: static bool __cdecl AltsoundProcessorBase::freeStream(unsigned long)" (?freeStream@AltsoundProcessorBase@@KA_NK@Z)
1>altsound_processor_base.obj : error LNK2019: unresolved external symbol BASS_ChannelStop referenced in function "protected: static bool __cdecl AltsoundProcessorBase::stopStream(unsigned long)" (?stopStream@AltsoundProcessorBase@@KA_NK@Z)
1>altsound_processor_base.obj : error LNK2019: unresolved external symbol BASS_ChannelSetAttribute referenced in function "protected: static bool __cdecl AltsoundProcessorBase::setStreamVolume(unsigned long,float)" (?setStreamVolume@AltsoundProcessorBase@@KA_NKM@Z)
1>altsound_processor_base.obj : error LNK2019: unresolved external symbol BASS_ChannelSetSync referenced in function "protected: bool __cdecl AltsoundProcessorBase::createStream(void *,struct _stream_info *)" (?createStream@AltsoundProcessorBase@@IEAA_NPEAXPEAU_stream_info@@@Z)
1>snd_alt.obj : error LNK2019: unresolved external symbol BASS_Init referenced in function "int __cdecl alt_sound_init(struct _cmd_data *)" (?alt_sound_init@@YAHPEAU_cmd_data@@@Z)
1>snd_alt.obj : error LNK2019: unresolved external symbol BASS_Free referenced in function alt_sound_exit
1>obj\VC2022\PinMAME\x64\Debug\PinMAME_VC2022vcd.exe : fatal error LNK1120: 11 unresolved externals
1>Done building project "PinMAME_VC2022.vcxproj" -- FAILED.
I'm an embedded developer in my day job, so I don't have much familiarity with desktop apps and how Windows linking/DLLs are supposed to work. It feels like there's a missing configuration in the project to get to the ext/bass libraries/DLLs linked.
Note that I tried winbuild.bat first, but it failed because I don't have CMake installed. That's why I reverted to using the create_vc2022_from_vc2012.bat script.
Note that I tried
winbuild.batfirst, but it failed because I don't have CMake installed. That's why I reverted to using thecreate_vc2022_from_vc2012.batscript.
Have you tried the win_build.bat file to create your solution? I have not had a lot of luck with the version-controlled project files. Requires CMake. You'll want a recent version if you're using VS2022
@tomlogic : Hopefully this helps: https://github.com/vpinball/pinmame/commit/705b9978e55dc3edce7a75efe90c9694921dfaf1
..or are you actually wanting to build x86 binaries?
I'm pretty sure I'm building x86 binaries at this point, which is fine for me. I recently moved, and probably won't get back to PinMAME for at least a month. When I do, I'll try getting CMake installed and running winbuild.bat.
I'm pretty sure I'm building x86 binaries at this point, which is fine for me. I recently moved, and probably won't get back to PinMAME for at least a month. When I do, I'll try getting CMake installed and running
winbuild.bat.
Did you manage to get this sorted?
@droscoe, I've been tied up with some other projects and haven't come back to attempts to build PinMAME.
Let us know if you need help again..