dbry / WavPack

WavPack encode/decode library, command-line programs, and several plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual Studio 2019 Support

2ji3150 opened this issue · comments

I have tried to upgrate into visual 2019 solutions. Got many of warnings.
And the build fails with fatal errors.
fatal error RC1015: cannot open include file 'afxres.h'.
Since Microsft drops support of the windows earlier than 10, maybe a good time to update to visul studio 2019?

Sorry about the delay in responding to this and I am planning on addressing it one way or another.

I have been informed that a very simple edit of the file wavpackdll.rc allows the build to complete with VS 2019:

replace the line
#include "afxres.h"
with
#include "WinResrc.h"
#define IDC_STATIC -1

I cannot try this myself at this time, but I suspect that it will work.

Thanks!

Thanks a lot ! it works!
BTW there are 12 warnings for the x64-release

Severity Code Description Project File Line Suppression State
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvtag 36
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". libwavpack 337
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wavpack 337
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvunpack 337
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvgain 337
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wavpackdll 337
Warning MSB4211 The property "CleanFile" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvtag 337
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". libwavpack 36
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wavpack 36
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvunpack 36
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wvgain 36
Warning MSB4211 The property "IntermediateOutputPath" is being set to a value for the first time, but it was already consumed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets (35,5)". wavpackdll 36

And Here is the migration log

https://send.firefox.com/download/c527765415fdb2a8/#OHCf1hvwSccmqIGbRljmFg

Thanks for letting me know about the warnings. The logs look okay. Hopefully I can fix all this once I upgrade to VS 2019. I'll leave this ticket open as a reminder.

I updated all the project files using the latest version of Visual Studio 2019.

Strangely I didn't get any of the errors that others have reported; everything builds fine. Perhaps Microsoft saw this issue and updated something?

Thanks for the works.
I tried git clone the newet master branch and build it.
Still get some error.
Am I missing any steps?

Severity Code Description Project File Line Suppression State
Warning MSB8012 TargetPath(C:\Users\s\Desktop\wavpack\WavPack\Debug\winamp_lng.dll) does not match the Linker's OutputFile property value (C:\Users\s\Desktop\wavpack\WavPack\Debug\in_wv.lng). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). winamp_lng C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1341
Warning MSB8012 TargetExt(.dll) does not match the Linker's OutputFile property value (.lng). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). winamp_lng C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1342
Warning MSB8012 TargetName(winamp_lng) does not match the Linker's OutputFile property value (in_wv). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). winamp_lng C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1343
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release libwavpack C:\Users\s\Desktop\wavpack\WavPack\src\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release wvunpack C:\Users\s\Desktop\wavpack\WavPack\wvunpackexe\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release wavpackdll C:\Users\s\Desktop\wavpack\WavPack\wavpackdll\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release wavpack C:\Users\s\Desktop\wavpack\WavPack\wavpackexe\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release wvgain C:\Users\s\Desktop\wavpack\WavPack\wvgainexe\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release wvtag C:\Users\s\Desktop\wavpack\WavPack\wvtagexe\cl 1
Error RC1015 cannot open include file 'afxres.h'. wavpackdll C:\Users\s\Desktop\wavpack\WavPack\wavpackdll\wavpackdll.rc 10
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release winamp C:\Users\s\Desktop\wavpack\WavPack\winamp\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release audition C:\Users\s\Desktop\wavpack\WavPack\audition\cl 1
Warning D9035 option 'Gm' has been deprecated and will be removed in a future release winamp C:\Users\s\Desktop\wavpack\WavPack\winamp\cl 1
Warning MSB8012 TargetPath(C:\Users\s\Desktop\wavpack\WavPack\Debug\audition.dll) does not match the Linker's OutputFile property value (C:\Users\s\Desktop\wavpack\WavPack\Debug\cool_wv4.flt). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). audition C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1341
Warning MSB8012 TargetExt(.dll) does not match the Linker's OutputFile property value (.flt). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). audition C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1342
Warning MSB8012 TargetName(audition) does not match the Linker's OutputFile property value (cool_wv4). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). audition C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1343
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification audition C:\Users\s\Desktop\wavpack\WavPack\audition\cool_wv4.obj 1
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification wvgain C:\Users\s\Desktop\wavpack\WavPack\wvgainexe\utils.obj 1
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification wvunpack C:\Users\s\Desktop\wavpack\WavPack\wvunpackexe\caff_write.obj 1
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification wavpack C:\Users\s\Desktop\wavpack\WavPack\wavpackexe\caff.obj 1
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification wvtag C:\Users\s\Desktop\wavpack\WavPack\wvtagexe\import_id3.obj 1
Warning MSB8012 TargetPath(C:\Users\s\Desktop\wavpack\WavPack\Debug\winamp.dll) does not match the Linker's OutputFile property value (C:\Users\s\Desktop\wavpack\WavPack\Debug\in_wv.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). winamp C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1341
Warning MSB8012 TargetName(winamp) does not match the Linker's OutputFile property value (in_wv). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). winamp C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 1343
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification winamp C:\Users\s\Desktop\wavpack\WavPack\winamp\in_wv.obj 1

Yes, unfortunately I get all those warnings too. I took a close look at some of them and don't really know what they mean or how to fix them. On the other hand, so far the artifacts I've tried (the command-line executables) all seem to be working correctly. I still have to test the DLLs, but the files are there and report correctly in Explorer, so I'm hopeful.

As for the actual error you're getting, my suggestion would be to use the solution posted at the top of this issue that worked before. I'm not sure why my setup does not require it, but I hesitate to change it without getting the error. Googling that error shows many responses, but the consensus seems to be that it has something to do with MFC not being installed in VS, and that manually editing the resource file is fine. I don't remember if I installed MFC (I don't think I would have unless it was the default), but in any event it works.

I'm a little curious as to why you might want to be building WavPack. If you're creating an application that uses libwavpack, the easiest ways are to either use the pre-built DLL, or if you don't want to distribute the extra file, simply link the whole library into your application. Having the whole WavPack source code in your setup seems like a lot of trouble, unless you're doing something else entirely with it.

And of course if you can figure out what's wrong with my solution and project files that generates those warnings, that would be great!

Sorry for late reply.
Reasons to rebuild wavpack just for study and make sure everything is good.
Visual Studio 2022 will be officially released soon, so I'll see it again if I have time.
Therefore, close this issue.
appreciate!