Audio Plugin build error Visual Studio 2015 with Clang 3.7


#1

So I'm trying to build my plugin on windows after finishing it on mac, but I need to use clang to compile it because I used a good amount of C++14 features and I did not realize that other compilers were a little more behind on keeping up with the c++ standards...

I am using Visual Studio 2015 Update 1 including the newly provided (and potentially buggy) Clang 3.7 support.  I just used the VS2010 project files generated from the Projucer as a starting point and changed the Platform Toolset to Clang 3.7 in the Project Properties.  After this change, there were a few project preference setting errors that I was able to work through because the error message refered directly to the name of Project Property in question, but now I am stuck with this error:

clang.exe : error : cannot specify -o when generating multiple output files

Sounds like some other non-juce user was having similar trouble and was able to fix the problem by disabling the precompiled headers project property:  http://stackoverflow.com/questions/34018144/visual-studio-2015-update-1-clang-error/35443232#35443232

Unfortunately doing so did not get rid of the error in my case.  Has anybody else seen this and found a workaround?

If i setup a new c++ dll project with the VS2015 Cross-Platform project template, it builds just fine.  I'm trying to compare the differences in the project preferences, but nothings seems to pop out as that different and matching the settings (as much as is possible without messing up the projucer-generated settings) doesn't fix the error...

Thanks guys!


#2

Wow, that's interesting. Here at ROLI we didn't yet try to build JUCE apps with Visual Studio and the new option of using clang as the compiler backend. Interesting to see that people actually want to do this now.

This definitely sounds like something we should check out. I'll try to set this up, and if I then encounter a similar error and find a way to fix it, I'll post it here!


#3

Awesome thanks for looking into this Timur!  I just tried the same process (Projucer->VS2010 project->open with VS2015->set Platform Toolset in Project Properties to Clang 3.7) with the JuceDemoPlugin and get the same result:  

- first errors about invalid values for the DebugInformationFormat and WarningLevel project properties which are easily fixed by changing those values to the newly avaible ones that are associated with Clang

- then:  clang.exe : error : cannot specify -o when generating multiple output files

 

Also as a side note, when using the VS2013 project file from Projucer, VS2015 complains that it cannot find any of the platform toolsets including the ones that are indeed installed and findable when I use the Projucer's VS2010 project file...