[SOLVED] Error with VS2015 regarding snprintf


I'm trying out the Visual Studio 2015 RC and while trying to build my plugin, I got this error: 

Error    C1189    #error:  Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\..\JuceLibraryCode\modules\juce_audio_plugin_client\VST3\juce_VST3_Wrapper.cpp)    Synthesizer    c:\program files (x86)\windows kits\10\include\10.0.10056.0\ucrt\stdio.h    1927

Is there an easy solution to fixing this in the JUCE files where it only has that behavior for VS2015? If so, it should probably be fixed in JUCE. I did find this post on StackOverflow regarding the same error, as well as the link for that error number on Microsoft's site.




There's also a huge list of warnings (349 for this project) and most of them are from JUCE library code.


Btw, I'm using version 3.1.1 and it has the same error with the JuceDemoPlugin

Is it the same as this? http://www.juce.com/forum/topic/vs2015-community-rc-project-problem

Haha. Yes, I believe so. Sorry about that. I'm not sure how I didn't find that post. I'll delete this one after I try the fix in that post.

Edit: Oh dang, it doesn't seem like you can delete posts. If you can, you can delete this post. I got it working thanks to that other post. I couldn't find the file that had that #define. 

Just in case anyone has this problem and finds this post, here's a way to fix it, which is also mentioned in the link Jules posted.

It's caused by this #define in VST3_SDK\pluginterfaces\base\fstrdefs.h on line 102:

#define snprintf _snprintf

To get it working you can replace it with this:

#if _MSC_VER < 1900 
#define snprintf _snprintf