Building Audacity on Visual Studio 2015
|Audacity is currently built with Visual Studio 2013 as outlined on Developing On Windows. This page is about experiments getting Audacity to build on VS 2015.
- Others may like to know that to solve the snprintf problem you can right-click over "Audacity" in Solution Explorer > Properties. Then expand "Configuration Properties" and click "General". Set "Platform Toolset" to "Visual Studio 2013 (v120)".
- Or, apply the changes in the commit "Switch to VS2015 (v140)" at https://github.com/henricj/audacity/commit/dd029b2. Henricj's fork is known working as of 17 April 2016 to build Audacity using Visual Studio 2015.
On this and other pages, I (User:Rachalmers) will be detailing just what I am doing to try and get Audacity to compile cleanly and successfully on Windows 10 using Visual Studio 2015 and its related SDKs.
However, as at Friday 15th April, 2016, I have the compile down to 21 out of 24 parts building successfully. Those not building are
Their problems are in the main, these types of problems.
- 22>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition
- 22>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf'
- 22>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration
I have applied this,
#if _MSC_VER < 1900 #define snprintf _snprintf #endif
to everywhere I can find a #define - and it made some little difference.... but the error persists. At the moment, I can't find the culprits.
So as of today, I have 655 Errors, 558 Warnings. Meaning 21 successful and 3 not.
I will detail what I have done so far to get to this stage in the next little while.