I am trying to build Audacity on Windows 10 using VS 2015 and I am getting several errors of the form:
Error C1189 #error: Macro definition of snprintf conflicts with Standard Library function declaration lv2 C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h 1927
The thing is that I have already searched the code several times (using Windows file explorer) and /commented out/ every occurrence of “#define snprintf _snprintf”. Where can these extra macro definitions be hidden?
I am trying to build Audacity on Windows 10 using VS 2015 and I am getting several thousand pairs of errors of the form:
Error C2039 'uintmax_t': is not a member of '`global namespace'' libnyquist C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 53
and
Error C2873 'uintmax_t': symbol cannot be used in a using-declaration libnyquist C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 53
The string value varies, but they all belong to cstdint.h . How can I get rid of these errors?
Topics merged. Please don’t post multiple topics about the same question.
I don’t build on Windows, but I see in the “compile.txt” file /win/ folder of the source code, that it says that “Microsoft Visual Studio 2013 C++” is required.
I’ve done everything, as far as I can tell, by the book, starting with a clean copy of the WXWidgets and Audacity sources, but unlike the case a couple of comments up, I don’t have conflicting versions of WXWidgets installed. Yet I still get the same missing zlib.h, wx/defs.h etc. errors.
OK. Sorry. I switched to using MVC++ 2013 before I posted that last comment and that’s why I commented on an existing topic relating to similar error messages building with that version rather than MVC++ 2015 which I had been trying previously.
I’ve resolved the problem with the missing zlib.h and other wx-related headers. It turned out that because VS 2015 hadn’t complained, I had forgotten to reboot after setting the WXWIN environment variable. With VS 2013 it seems you do have to reboot.
However now I am back with one of the errors I had when I originally posted:
Error MSB3721 The command "msgfmt -o "C:\Users\Robert\Development\audacity-master\win\Release\Languages\af\Audacity.mo" ..\..\..\locale\af.po" exited with code 1. locale C:\Users\Robert\Development\audacity-master\win\Projects\locale\po.targets 45
I read in another post that I needed to get hold of a copy of msgfmt.exe and install it in my path. I did that and then rebooted, but I’m still getting the same error. Actually, strictly speaking I’m getting that error half the time. The other half of the time when I build I get errors of this kind in po.targets in the locale project:
error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v12.0. The process cannot access the file 'C:\Users\Robert\AppData\Local\Temp\jdezx3zl.dll' because it is being used by another process
I don’t need any languages other than English, so if there is a way to save time by just leaving out the locales altogether I would be fine with that.