[SOLVED]Build error when using Visual Studio 2019 with Clang compiler

SDK for VST 3 audio plug-in and host development.
Post Reply
f.berti
Posts: 24
Joined: Thu Nov 02, 2017 5:50 pm

[SOLVED]Build error when using Visual Studio 2019 with Clang compiler

Post by f.berti »

I've recently switched from VS2017 to VS2019 and since it now has built-in support for Clang, I tried to build one of my plug-ins using it, but is failing to compile because of 2 errors:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\deque(872,50): error : no matching function for call to 'exchange'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\yvals_core.h(1135,20): message : expanded from macro '_STD'
1>D:\Development\cpp\ignite\projects\windows\visualstudio\VST\..\..\..\..\..\SDKs\VST3_SDK\base/source/updatehandler.cpp(154,8): message : in instantiation of member function 'std::deque<Steinberg::Update::UpdateData, std::allocator<Steinberg::Update::UpdateData> >::~deque' requested here
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\utility(570,18): message : candidate template ignored: substitution failure [with _Ty = std::_Container_proxy *, _Other = int]
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\utility(574,20): error : assigning to 'std::_Container_proxy *' from incompatible type 'int'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\deque(872,55): message : in instantiation of function template specialization 'std::exchange<std::_Container_proxy *, int>' requested here
1>D:\Development\cpp\ignite\projects\windows\visualstudio\VST\..\..\..\..\..\SDKs\VST3_SDK\base/source/updatehandler.cpp(154,8): message : in instantiation of member function 'std::deque<Steinberg::Update::DeferedChange, std::allocator<Steinberg::Update::DeferedChange> >::~deque' requested here
Everything is fine using the Microsoft VS compiler and oddly enough even using the LLVM Compiler Toolchain:
https://marketplace.visualstudio.com/it ... -toolchain

so this seems to only be related to the VS2019 built-in implementation.

Any chance for a fix in the future updates?
I've tested the VST3 SDK v3.6.12 and 3.6.14 and both have the same issue.

Regards,
Federico
Last edited by f.berti on Fri Jun 12, 2020 10:41 pm, edited 1 time in total.

Arne Scheffler
Posts: 354
Joined: Mon Jun 20, 2016 7:53 am

Re: Build error when using Visual Studio 2019 with Clang compiler

Post by Arne Scheffler »

For me this looks more like a problem of the compiler and I cannot think of a fix we could apply. But if you have an idea what needs to be changed, you're welcome to propose it.

f.berti
Posts: 24
Joined: Thu Nov 02, 2017 5:50 pm

Re: Build error when using Visual Studio 2019 with Clang compiler

Post by f.berti »

Nevermind, ended up being related to one of my macro definitions, my bad.
It compiles fine now, sorry. :oops:

Post Reply