Open CamelCaseCam opened 2 years ago
Where do you need this "YAML_CPP_STATIC_DEFINE"? Actually, I tried building a static library (which was successful) and the library is linked in the right way as well, but I still get linker errors if I am using "YAML::LoadFile".
I believe I had the same problem with YAML::LoadFile, I fixed it by defining YAML_CPP_STATIC_DEFINE in my whole project in CMake.
Actually, my problem was that I build the library for 32bit and included it in a project which is using 64bit. I did not need to define anything, after building the library for 64bit.
I didn't understand what to include to follow the tutorial, so I figured I'd leave some instructions here. The only file (as far as I know) that you have to include is "yaml-cpp/yaml.h". If you're using a static library, you'll need to define YAML_CPP_STATIC_DEFINE. I hope this helps someone.