Hi. I created an Audio Plugin project with Introjucer for VS2015, went to compile, got lots of warning, but this seems to be the only error:
All packages are already installed and there is nothing to restore.
NuGet package restore finished.
1>------ Build started: Project: VS2015, Configuration: Debug x64 ------
1> juce_VST3_Wrapper.cpp
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10056.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition
1> E:\SDKs\VST3 SDK\pluginterfaces/base/fstrdefs.h(102): note: see previous definition of 'snprintf'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10056.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Im a little inexperienced at that level of depth of understanding, could someone enlighen me?
Thanks!
jules
May 5, 2015, 9:11am
2
None of this is JUCE code! Not sure what's going on, to be honest, but I think it's more of a question for Microsoft than for us!
From what I read, Microsoft has brought back a macro definition that conflicts with VST3 SDK
\SDKs\VST3 SDK\pluginterfaces/base/fstrdefs.h(102): note: see previous definition of 'snprintf'
So it's not JUCE's fault for sure, but I wonder how Introjucer will handle this. I don't know if I can safely undefine of of the conflicting macros.
anima
May 6, 2015, 4:43pm
4
That snprintf function and similar weren't offically supported in previous MSVC versions, they had non standard leading underscore versions i.e. "_snprintf".
https://github.com/CharlesHolbrow/ChuckDelay/blob/master/pluginterfaces/base/fstrdefs.h (I think that's the same file, around line 100)
You can see they redefine them as the standard non-leading underscore versions. You could change that file to only redefine them for MSVC version less than 2015. That way it will still compile with older versions too.
#if _MSC_VER < 1900
It works, Mr. Anima, thanks. Still I wonder if it might cause some compatibility issues.
anima
May 7, 2015, 9:29am
6
Well if it works for the time being you'll be alright. They'll have to patch it in the VST3 SDK eventually anyway.