steam-audio icon indicating copy to clipboard operation
steam-audio copied to clipboard

Can't seem to build with BUILD_SHARED_LIBS in 4.7.0

Open JamDoggie opened this issue 3 months ago • 0 comments

System Information Please provide the following information about your system:

  • Steam Audio version: 4.7.0 (master branch)
  • (If applicable) Unity version: N/A
  • (If applicable) Unreal Engine version: N/A
  • (If applicable) FMOD Studio version: N/A
  • Operating System and version: Windows 11 25H2 26200.7019
  • (Optional) CPU architecture (e.g. x86-64, armv7): x64 (12600KF)
  • Using VS2022, with VS2017 also installed for VS2015 build tools for Radeon Rays.

Issue Description On 4.7.0, I seem to be unable to successfully build steam audio as a dynamic library. This is the output I get when attempting to build with CMake with BUILD_SHARED_LIBS:

6>mysofa.lib(reader.obj) : error LNK2019: unresolved external symbol __imp_realloc referenced in function getArray
6>mysofa.lib(speex_resampler.obj) : error LNK2001: unresolved external symbol __imp_realloc
6>mysofa.lib(dataobject.obj) : error LNK2001: unresolved external symbol __imp_realloc
6>mysofa.lib(fractalhead.obj) : error LNK2001: unresolved external symbol __imp_realloc
6>mysofa.lib(check.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function _vsscanf_l
6>C:\Users\JamDo\Documents\GitHub\steam-audio\core\build\windows-vs2019-x64\src\core\Debug\phonon.dll : fatal error LNK1120: 2 unresolved externals

I am able to build the library statically just fine, though that is useless to me as I am trying to debug a custom C# integration. I was able to get get_dependencies.py to successfully build everything in release in debug, however I have excluded the benchmarks, docs, tests, and samples from the cmake configuration as I don't need them for my purposes. I was also able to build a DLL with the 4.6.0 release commit, so something seems to have broken (atleast on my machine) in this case.

Steps To Reproduce Steps to reproduce the behavior:

  1. Clone repository fresh, install cmake 3.17 and other necessary dependencies (I am on python 3.12 instead of 3.4 but that shouldn't be an issue here)
  2. Install and configure vs2015 build tools. I downloaded VS2017 and opted to download the optional VS2015 build tools in the installer.
  3. For some reason, I had to hardcode get_dependencies.py to find my specific installation of 2015 build tools on my drive when prompted to use vs2015 build tools. This was the only way I could get Radeon Rays to build, and was definitely also a pain point.

If I'm just missing something in regards to how this library is intended to be built, even just knowing would be helpful. I can definitely make a PR to improve the wording in the build docs for the core project if necessary.

JamDoggie avatar Nov 12 '25 02:11 JamDoggie