vgmrips / vgmplay-legacy

VGM file command-line player and Winamp plugin.
http://vgmrips.net
220 stars 52 forks source link

MSVC2019 build fails #79

Closed birdybro closed 3 years ago

birdybro commented 3 years ago

Summary

The current build instructions do not list a key prerequisite and this causes current MSVC versions to fail compiling later builds. Given that there have been no new releases since 2018 and significant changes have happened since then, the readme ought to be updated to reflect this common difficulty many will have (since I doubt most people are using MSVC 6.0 in 2020, the software is not free and the installation process on Windows 10 is a nightmare --> https://www.codeproject.com/Articles/1191047/Install-Visual-Studio-on-Windows).

Errors/attempts

Version used: latest commit as of today --> https://github.com/vgmrips/vgmplay/commit/ead5e589d2aa9fbf5bc470eb9ab8795ef455440e

I tried both methods that were provided to me by the readme as is. Upon opening it says the 2010 build tools cannot be located. I did two tests, running it without upgrading the build tools configuration, and running it with upgrading the build tools configuration (as the prompt from MSVC2019 told me I should). Each time I unzipped a fresh folder to be sure that it was a fresh run. Here's the logs from each:

Just running "build solution" after loading the vcprojx file as instructed like normal:

1>------ Build started: Project: VGMPlay, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(390,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
1>Done building project "VGMPlay.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

With the build being upgraded as prompted by MSVC2019:

1>------ Build started: Project: VGMPlay, Configuration: Debug Win32 ------
1>ChipMapper.c
1>2151intf.c
1>2203intf.c
1>2413intf.c
1>2608intf.c
1>2610intf.c
1>2612intf.c
1>262intf.c
1>3526intf.c
1>3812intf.c
1>8950intf.c
1>adlibemu_opl2.c
1>adlibemu_opl3.c
1>ay8910.c
1>ay8910_opl.c
1>ay_intf.c
1>c140.c
1>c352.c
1>c6280.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\opl.c(1276,27): warning C4018: '<': signed/unsigned mismatch (compiling source file chips\adlibemu_opl2.c)
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ay8910.c(446,70): warning C4244: '=': conversion from 'double' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ay8910.c(451,33): warning C4244: '=': conversion from 'double' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ay8910.c(492,68): warning C4244: '=': conversion from 'double' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ay8910.c(497,48): warning C4244: '=': conversion from 'double' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\opl.c(1276,27): warning C4018: '<': signed/unsigned mismatch (compiling source file chips\adlibemu_opl3.c)
1>c6280intf.c
1>dac_control.c
1>emu2149.c
1>emu2413.c
1>es5503.c
1>es5506.c
1>fm.c
1>fm2612.c
1>fmopl.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\es5506.c(591,3): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\es5506.c(703,3): warning C4018: '>': signed/unsigned mismatch
1>gb.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\es5506.c(807,3): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\es5506.c(870,12): warning C4013: 'printf' undefined; assuming extern returning int
1>iremga20.c
1>k051649.c
1>k053260.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(356,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\gb.c(1197,47): warning C4018: '<': signed/unsigned mismatch
1>k054539.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\iremga20.c(220,12): warning C4013: 'printf' undefined; assuming extern returning int
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fm.c(1763,54): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(523,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT8', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fm.c(1798,86): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(850,22): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(1399,63): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(1402,64): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(1407,59): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\fmopl.c(1409,50): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>multipcm.c
1>nes_apu.c
1>nes_intf.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\k053260.c(324,21): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\k053260.c(332,19): warning C4018: '>': signed/unsigned mismatch
1>np_nes_apu.c
1>np_nes_dmc.c
1>np_nes_fds.c
1>okim6258.c
1>okim6295.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(323,1): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(367,34): warning C4244: '=': conversion from 'float' to 'unsigned int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(562,48): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(578,43): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(580,28): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(597,44): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(599,31): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(608,44): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(610,31): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(634,78): warning C4244: '=': conversion from 'const double' to 'unsigned int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(635,84): warning C4244: '=': conversion from 'const double' to 'unsigned int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(643,57): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(645,58): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(651,53): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(626,1): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\multipcm.c(650,1): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
1>Ootake_PSG.c
1>opll.c
1>opm.c
1>panning.c
1>pokey.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\pokey.c(550,2): warning C4018: '<': signed/unsigned mismatch
1>pwm.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\okim6258.c(118,1): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
1>qsound_ctr.c
1>qsound_intf.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\pokey.c(1278,40): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\pokey.c(1314,40): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\pokey.c(1342,40): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\pokey.c(1379,40): warning C4018: '<': signed/unsigned mismatch
1>qsound_mame.c
1>rf5c68.c
1>saa1099.c
1>scd_pcm.c
1>scsp.c
1>scspdsp.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\saa1099.c(456,11): warning C4013: 'printf' undefined; assuming extern returning int
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\qsound_ctr.c(227,28): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\scsplfo.c(141,1): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data (compiling source file chips\scsp.c)
1>segapcm.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\scsp.c(609,27): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\scsp.c(618,33): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\scsp.c(632,36): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\scsp.c(1077,12): warning C4013: 'printf' undefined; assuming extern returning int
1>sn76489.c
1>sn76496.c
1>sn76496_opl.c
1>sn764intf.c
1>upd7759.c
1>vsu.c
1>ws_audio.c
1>x1_010.c
1>ym2151.c
1>ym2413.c
1>ym2413_opl.c
1>ym2413hd.c
1>ym2612.c
1>ym3438.c
1>ymdeltat.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\x1_010.c(163,1): warning C4013: 'printf' undefined; assuming extern returning int
1>ymf262.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym3438.c(1532,128): warning C4244: '=': conversion from 'double' to 'Bit32s', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym3438.c(1533,128): warning C4244: '=': conversion from 'double' to 'Bit32s', possible loss of data
1>ymf271.c
1>ymf278b.c
1>ymz280b.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(575,17): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(684,52): warning C4244: '=': conversion from 'double' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(712,60): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(724,60): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(734,35): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(736,39): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(286,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(1544,65): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(1546,65): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(2079,22): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2151.c(2404,9): warning C4101: 'chn': unreferenced local variable
1>dbus_stub.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(300,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT32', possible loss of data
1>mmkeys_Win.c
1>pt_ioctl.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(453,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT8', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(723,22): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(467,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT8', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(730,22): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(202,1): warning C4244: 'initializing': conversion from 'double' to 'const UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(1393,65): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(1396,66): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(1401,61): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ym2413.c(1404,52): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(519,48): warning C4244: 'function': conversion from 'double' to 'int', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(280,1): warning C4244: 'initializing': conversion from 'double' to 'const INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(563,63): warning C4244: '=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(612,75): warning C4244: 'function': conversion from 'UINT64' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(618,82): warning C4244: 'function': conversion from 'UINT64' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(618,159): warning C4244: 'function': conversion from 'UINT64' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(620,78): warning C4244: 'function': conversion from 'UINT64' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(620,154): warning C4244: 'function': conversion from 'UINT64' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(636,38): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(637,38): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(288,1): warning C4244: 'initializing': conversion from 'double' to 'const INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(924,80): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(928,80): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(449,22): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(989,81): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(469,22): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(991,81): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(492,22): warning C4018: '>': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(1100,80): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf271.c(1103,80): warning C4244: '+=': conversion from 'INT64' to 'INT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(648,17): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf278b.c(669,16): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(381,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(427,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(437,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(493,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(519,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(524,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(582,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(608,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(613,17): warning C4018: '>=': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymz280b.c(731,18): warning C4018: '<': signed/unsigned mismatch
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(1363,65): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(1366,66): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(1371,61): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(1373,52): warning C4244: '=': conversion from 'double' to 'UINT32', possible loss of data
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(1711,13): warning C4013: 'printf' undefined; assuming extern returning int
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\chips\ymf262.c(2563,6): warning C4101: 'chn': unreferenced local variable
1>Stream.c
1>VGMPlay.c
1>VGMPlayUI.c
1>VGMPlay_AddFmts.c
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\VGMPlayUI.c(768,2): warning C4996: 'GetVersionExA': was declared deprecated
1>zlibd.lib(gzlib.obj) : error LNK2019: unresolved external symbol __imp___snprintf referenced in function _gz_open
1>zlibd.lib(gzwrite.obj) : error LNK2019: unresolved external symbol __imp___vsnprintf referenced in function _gzvprintf
1>C:\Users\aberu\Downloads\vgmplay-master\VGMPlay\Debug_Win32\VGMPlay.exe : fatal error LNK1120: 2 unresolved externals
1>Done building project "VGMPlay.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

So the first error indicated I need to upgrade the project to be able to build it. So I did that next time, and the errors I got showed 2 linker errors (LNK2019 - https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(LNK2019)%26rd%3Dtrue&view=msvc-160) and 2 unresolved externals (LNK1120 - https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk1120?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(LNK1120)%26rd%3Dtrue&view=msvc-160).

I have all of the MS VC redistributals from the chocolatey vcredist-all package which should cover all those bases. I'm now downloading and installing the Win7 SDK (https://www.microsoft.com/en-us/download/details.aspx?id=8279) just to cover my bases... and I got the same errors. Looking through the issues yields this identical problem to mine:

https://github.com/vgmrips/vgmplay/issues/44

The compilation instructions do not list zlib as a prerequisite, or any prerequisites, which can unnecessarily lead to confusion.

I'll now attempt to, as those instructions point out, compile zlib on windows 10 for use in MSVC2019 to see if I can get anywhere. If I do, I'll report back.

birdybro commented 3 years ago

After many attempts with getting zlib in there, I have no idea how to get this to work in MSVC2019, so I'm going the MSYS2 method, but it still fails in MSYS2:

$ make WINDOWS=1
...
VGMPlay.c:43:10: fatal error: conio.h: No such file or directory
   43 | #include <conio.h> // for _inp()
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:297: obj/VGMPlay.o] Error 1

Apparently conio.h is missing. So I commented out the 3 lines in the master referencing conio.h to see what happens... then I get a zlib.h missing error.

VGMPlay.c:85:10: fatal error: zlib.h: No such file or directory
   85 | #include <zlib.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:297: obj/VGMPlay.o] Error 1

Which doesn't make sense since it is actually there, it's just in ~/VGMPlay/zlib, however... in_vgm.c, VGMPlay_AddFmts.c, and VGMPlay.c all have zlib.h included with #include <zlib.h> which is for implementation dependent method of searching for the header. Changing it to #include "zlib/zlib.h" yields the following:

Compiling VGMPlay.c ...
VGMPlay.c: In function ‘GetGZFileLengthW’:
VGMPlay.c:1276:10: warning: implicit declaration of function ‘_wfopen’; did you mean ‘_lopen’? [-Wimplicit-function-declaration]
 1276 |  hFile = _wfopen(FileName, L"rb");
      |          ^~~~~~~
      |          _lopen
VGMPlay.c:1276:8: warning: assignment to ‘FILE *’ {aka ‘struct __sFILE64 *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1276 |  hFile = _wfopen(FileName, L"rb");
      |        ^
Compiling VGMPlay_AddFmts.c ...
Compiling Stream.c ...
Compiling ChipMapper.c ...
Compiling VGMPlayUI.c ...
VGMPlayUI.c: In function ‘main’:
VGMPlayUI.c:560:5: warning: implicit declaration of function ‘_getch’; did you mean ‘_getc_r’? [-Wimplicit-function-declaration]
  560 |     _getch();
      |     ^~~~~~
      |     _getc_r
VGMPlayUI.c:611:11: warning: implicit declaration of function ‘_kbhit’ [-Wimplicit-function-declaration]
  611 |     while(_kbhit())
      |           ^~~~~~
VGMPlayUI.c: In function ‘wprintc’:
VGMPlayUI.c:1941:12: warning: implicit declaration of function ‘_vsnwprintf’; did you mean ‘vswprintf’? [-Wimplicit-function-declaration]
 1941 |   RetVal = _vsnwprintf(printbuf, BufSize - 0x01, format, arg_list);
      |            ^~~~~~~~~~~
      |            vswprintf
Compiling mmkeys_Win.c ...
Compiling dbus_stub.c ...
Linking vgmplay ...
/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [Makefile:274: vgmplay] Error 1

So is there also a prerequisite that is not being mentioned for MSYS2?

birdybro commented 3 years ago

Removed my comment that was about ubuntu install because I was being a dumb :P. I was able to compile on Ubuntu 16.04 succesfully. Will edit my progress on MSVC and MinGW/MSYS2 as I figure those out above.

ValleyBell commented 3 years ago

Let me clear things about zlib up at first:

For MSVC in Win32 mode, what works best is to link against zdll.lib. Unfortunately the vcxproj seems to link against zlibd.lib in Win32 Debug mode. (VC6 Win32 Debug, static lib) That definitely doesn't work. (IIRC not even VC2010 was able to link against the VC6 debug build of zlib.) I'll see if I can fix the project later. I also included zlib.lib (VC6 Win32 Release, static lib), which I used for building in_vgm. I'm very sure that none of the static libs work with VC2015 and higher. (I think they may cause trouble with VC2010 as well, but I don't remember details.)

There are no 64-bit zlib DLLs, so for those, zlibstat64[d].lib files are included. These are built with MSVC 2010 and will probably not work with VC2015 and higher, sorry.

birdybro commented 3 years ago

Thanks for the headsup! It's been a fun learning process personally anyways, so no apologies necessary! :)

ValleyBell commented 3 years ago

As for why MSYS2 fails to find <conio.h> - no idea. It's a standard Windows header used for all sorts of console functions. VGMPlayUI.c uses it for _getch and _kbhit (keyboard controls). _inp isn't used unless you set DISABLE_HWOPL_SUPPORT=0

birdybro commented 3 years ago

I'm reinstalling MSYS2 - https://www.msys2.org/ completely to rule out problems on my end, since it was an older configuration. I had made a little progress by manually installing libao, dbus, and headers-git packages that were for msys2 (pacman -s method), but then ran into a huge amount of other errors, then my computer rebooted since I was doing other things, and lost my notes X_X

So anyways, reinstalling again, will report back with what I find.

birdybro commented 3 years ago

Possible necessary first step is the make libao dbus and headers packages in msys2 as base msys2 installation does not have these. The names of these packages for reference:

I also installed git just to speed things up on my end in testing. Here's the run I did.

$ pacman -S make mingw-w64-x86_64-libao mingw-w64-x86_64-headers-git mingw-w64-x86_64-dbus git
...
$ git clone https://github.com/vgmrips/vgmplay.git
$ cd vgmplay/VGMPlay
$ make
$ make WINDOWS=1
Compiling chips/262intf.c ...
Compiling chips/2151intf.c ...
Compiling chips/2203intf.c ...
Compiling chips/2413intf.c ...
Compiling chips/2608intf.c ...
Compiling chips/2610intf.c ...
Compiling chips/2612intf.c ...
Compiling chips/3526intf.c ...
Compiling chips/3812intf.c ...
Compiling chips/8950intf.c ...
Compiling chips/adlibemu_opl2.c ...
Compiling chips/adlibemu_opl3.c ...
Compiling chips/ay8910.c ...
Compiling chips/ay_intf.c ...
Compiling chips/c140.c ...
Compiling chips/c352.c ...
Compiling chips/c6280.c ...
Compiling chips/c6280intf.c ...
Compiling chips/dac_control.c ...
Compiling chips/es5503.c ...
Compiling chips/es5506.c ...
Compiling chips/emu2149.c ...
Compiling chips/emu2413.c ...
Compiling chips/fm2612.c ...
Compiling chips/fm.c ...
Compiling chips/fmopl.c ...
Compiling chips/gb.c ...
Compiling chips/iremga20.c ...
Compiling chips/k051649.c ...
Compiling chips/k053260.c ...
Compiling chips/k054539.c ...
Compiling chips/multipcm.c ...
Compiling chips/nes_apu.c ...
Compiling chips/nes_intf.c ...
Compiling chips/np_nes_apu.c ...
Compiling chips/np_nes_dmc.c ...
Compiling chips/np_nes_fds.c ...
Compiling chips/okim6258.c ...
Compiling chips/okim6295.c ...
Compiling chips/Ootake_PSG.c ...
Compiling chips/opll.c ...
Compiling chips/opm.c ...
Compiling chips/panning.c ...
Compiling chips/pokey.c ...
Compiling chips/pwm.c ...
Compiling chips/qsound_ctr.c ...
Compiling chips/qsound_mame.c ...
Compiling chips/qsound_intf.c ...
Compiling chips/rf5c68.c ...
Compiling chips/saa1099.c ...
Compiling chips/segapcm.c ...
Compiling chips/scd_pcm.c ...
Compiling chips/scsp.c ...
Compiling chips/scspdsp.c ...
Compiling chips/sn76489.c ...
Compiling chips/sn76496.c ...
Compiling chips/sn764intf.c ...
Compiling chips/upd7759.c ...
Compiling chips/vsu.c ...
Compiling chips/ws_audio.c ...
Compiling chips/x1_010.c ...
Compiling chips/ym2151.c ...
Compiling chips/ym2413.c ...
Compiling chips/ym2612.c ...
Compiling chips/ym3438.c ...
Compiling chips/ymdeltat.c ...
Compiling chips/ymf262.c ...
Compiling chips/ymf271.c ...
Compiling chips/ymf278b.c ...
Compiling chips/ymz280b.c ...
Compiling chips/ay8910_opl.c ...
Compiling chips/sn76496_opl.c ...
Compiling chips/ym2413hd.c ...
Compiling chips/ym2413_opl.c ...
Compiling VGMPlay.c ...
VGMPlay.c:43:10: fatal error: conio.h: No such file or directory
   43 | #include <conio.h> // for _inp()
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:297: obj/VGMPlay.o] Error 1

MSYS2 by default includes their include folders into the environment variables already, so I'm not sure why it can't find it when conio.h is specifically already there :P

superctr commented 3 years ago

you shouldn't need to mess too much with packages, just make sure you install the correct versions (prefixed with mingw-w64-x86_64 etc, you can run pacman -Ss <package name> to search for a package and check which versions are available. Build vgmplay with make WINDOWS=1. You don't need dbus or libao for Windows builds.

birdybro commented 3 years ago

Okay, I removed libao and dbus. conio.h same error still there. Important to note, if I remove the headers-git package, also the same error. So maybe the mingw-w64-x86_64-headers-git headers as installed need an PATH environment variable configured within MSYS2's console? hrmm...

birdybro commented 3 years ago

Okay, reinstalled mingw-w64-x86_64-headers-git package, added to MSYS2 PATH with export C_INCLUDE_PATH='C:\msys64\mingw64\x86_64-w64-mingw32\include' just to rule out PATH issue, not seeing conio.h and...

Well there were a ton of errors which I assume are due to these being 64-bit headers or due to a mismatch between microsoft's conio.h and borland's conio.h? Either way I tried mingw32.exe's console instead to rule out some stuff, same error.

So essentially the error is it can't find conio.h, and when i force it to see it, it doesn't like it. :P

superctr commented 3 years ago

Keep in mind that you should launch MSYS2 using the "MSYS2 MinGW-w64 x86-64" shortcut in order for it to detect the proper toolchain. This includes the includes folder as well as libraries.

ValleyBell commented 3 years ago

The Visual Studio projects should be fixed with fb3a72d37b7e515e800eddbe776a17a3531cfa8b.

@birdybro please test and close the issue if it works.

birdybro commented 3 years ago

Yup it works! Thanks!