open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
55 stars 10 forks source link

yaml-cpp error #703

Closed ludgerha closed 2 years ago

ludgerha commented 2 years ago

Dear all, I am getting this error on the last step, when building with cmake --build . C:\Users\hach_lu\.conan\data\yaml-cpp\0.6.3\_\_\package\ff82a1e70ba8430648a79986385b20a3648f8c19\include\yaml-cpp/excep tions.h(148): error C2220: Warnung wird als Fehler interpretiert, es wurde keine object-Datei generiert. [D:\OSP\libcos im-master-unchanged\libcosim-master\build\src\cosim.vcxproj] C:\Users\hach_lu\.conan\data\yaml-cpp\0.6.3\_\_\package\ff82a1e70ba8430648a79986385b20a3648f8c19\include\yaml-cpp/excep tions.h(148): warning C4275: class "std::runtime_error" ist keine DLL-Schnittstelle und wurde als Basisklasse für die D LL-Schnittstelle class "YAML::Exception" verwendet [D:\OSP\libcosim-master-unchanged\libcosim-master\build\src\cosim.vc xproj] I am using conan 1.49.0, cmake 3.18.0 and VS 2017. What I am doing wrong here?

kyllingstad commented 2 years ago

My first thought is that this is a problem with the yaml-cpp package, not libcosim, though I may be wrong in this. Are you sure you have an updated revision (i.e., package recipe version) of the yaml-cpp package and that you're getting it from the right source (ConanCenter)?

A workaround that should let you compile libcosim despite this warning is to set the CMake variable LIBCOSIM_TREAT_WARNINGS_AS_ERRORS=OFF.

kyllingstad commented 2 years ago

It looks like we've started getting the same errors in our CI builds now. Something must have changed upstream in the yaml-cpp package, and we need to do something to deal with it.