Skip to content

building vgmlib with visual studio 2019

Technical discussion which is not directly related to VGM files. Talk about Hardware and Software.

Moderator: Staff

  • ericde45 Offline
  • Posts: 4
  • Joined: 2022-12-27, 17:31:05

building vgmlib with visual studio 2019

Post by ericde45 »

Hello all,

i am trying to build the libvgm from github ( https://github.com/ValleyBell/libvgm ) using visual studio 2019
i was able to setup and use cmake
and i got libvgm listed in visual studio
but when trying to build all, i am getting some errors linked to zlib library i think
i tried to add zlib in libs folder with no success

can someone guide me a little bit to avoid the above errors ?

thanks a lot


external symbol unresolved
( sorry it's written in french )

C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-player_Win64d.lib(gymplayer.cpp.obj) : error LNK2019: symbole externe non résolu inflate référencé dans la fonction "private: unsigned char __cdecl GYMPlayer::DecompressZlibData(void)" (?DecompressZlibData@GYMPlayer@@AEAAEXZ)
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-player_Win64d.lib(gymplayer.cpp.obj) : error LNK2019: symbole externe non résolu inflateEnd référencé dans la fonction "private: unsigned char __cdecl GYMPlayer::DecompressZlibData(void)" (?DecompressZlibData@GYMPlayer@@AEAAEXZ)
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-player_Win64d.lib(gymplayer.cpp.obj) : error LNK2019: symbole externe non résolu inflateInit2_ référencé dans la fonction "private: unsigned char __cdecl GYMPlayer::DecompressZlibData(void)" (?DecompressZlibData@GYMPlayer@@AEAAEXZ)
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzread référencé dans la fonction FileLoader_ReadGZ
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzeof référencé dans la fonction FileLoader_EofGZ
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzclose référencé dans la fonction FileLoader_CloseGZ
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzopen référencé dans la fonction FileLoader_InitW
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzseek référencé dans la fonction FileLoader_SeekGZ
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gztell référencé dans la fonction FileLoader_TellGZ
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(FileLoader.c.obj) : error LNK2019: symbole externe non résolu gzopen_w référencé dans la fonction FileLoader_InitW
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(StrUtils-CPConv_IConv.c.obj) : error LNK2019: symbole externe non résolu libiconv_open référencé dans la fonction CPConv_Init
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(StrUtils-CPConv_IConv.c.obj) : error LNK2019: symbole externe non résolu libiconv référencé dans la fonction CPConv_StrConvert
C:\Jaguar\YM2151\libvgm\out\build\x64-Debug\vgm-utils_Win64d.lib(StrUtils-CPConv_IConv.c.obj) : error LNK2019: symbole externe non résolu libiconv_close référencé dans la fonction CPConv_Deinit
  • User avatar
  • ValleyBell Offline
  • Posts: 4770
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I'm afraid that the zlib dependency is one of the more difficult parts about libvgm.

My solution for a VS2017 build was:
  • download the zlib GitHub repository
  • compile the project contrib/vstudio/vc14/zlibvc.sln
  • tell CMake to make libvgm use the resulting zlibstat.lib files
Post Reply