Hello,
I have worked for some weeks now on my plugin for the S24 version, but suddenly I got some compile errors, pointing to the platform toolset of visual studio. Has this happened to someone else as well? I am using VS2022, but the generator for S24 generated a VS2019 solution (or at least the projects are using the platform toolset of VS2019). Is this a known issue and does someone have a quick fix for this?
This is the error message I am getting:
1>main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\typeinfo(39,18): error C3668: "std::bad_cast::_Doraise": Die Methode mit dem Überschreibungsspezifizierer "override" hat keine Basisklassenmethoden überschrieben. (Quelldatei wird kompiliert ..\source\SomeClass.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\typeinfo(40,9): error C3861: "_RAISE": Bezeichner wurde nicht gefunden. (Quelldatei wird kompiliert ..\source\SomeClass.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\typeinfo(51,18): error C3668: "std::bad_typeid::_Doraise": Die Methode mit dem Überschreibungsspezifizierer "override" hat keine Basisklassenmethoden überschrieben. (Quelldatei wird kompiliert ..\source\SomeClass.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\typeinfo(52,9): error C3861: "_RAISE": Bezeichner wurde nicht gefunden. (Quelldatei wird kompiliert ..\source\SomeClass.cpp)
The class SomeClass looks like this:
#pragma once
#include <unordered_map>
class DebugRenderer;
class SomeClass
{
public:
static SomeClass *GetInstance();
void RegisterDebugRenderer(int inCommandId, DebugRenderer *inRenderer);
void UnregisterDebugRenderer(int inCommandId, DebugRenderer *inRenderer);
DebugRenderer *FindDebugRenderer(int inCommandId);
private:
std::unordered_map<int, DebugRenderer*> mDebugRenderers;
};
The class DebugRenderer registers itself in this singleton when being constructed and unregisters when its destructor is called.
Thank you for your time!
All the best,
Can
Edit: I just tried out to remove the source files for SomeClass.h and SomeClass.cpp from the project and comment out every usage, then everything compiles successfully again. I added the files normally into the source directory and re-generated the project solution after that, so that it shows up inside visual studio and wrote the code normally inside VS. So I am not sure why this doesn't compile, any guidance would be greatly appreciated!