jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

Newest release won't build #1218

Open killereks opened 10 months ago

killereks commented 10 months ago

I've used CMake to generate the .sln file and then built the project. I have then linked everything correctly but i get these two errors (C++ 17):

Severity    Code    Description Project File    Line    Suppression State
Error   C2491   'YAML::detail::node::m_amount': definition of dllimport static data member not allowed  Dependencies\yaml\src\node_data.cpp 16  

Severity    Code    Description Project File    Line    Suppression State
Error   C2720   'YAML::detail::node::m_amount': '__declspec(dllimport)' storage-class specifier illegal on members  Dependencies\yaml\src\node_data.cpp 16  
faustinozanetto commented 3 months ago

I had the same issue and one solution I found was adding the define: yaml_cpp_EXPORTS to my configuration project.