undefined reference to YAML::LoadFile

后端 未结 5 627
梦如初夏
梦如初夏 2020-12-19 17:49

I\'m trying to use the new version of libyaml-cpp and having linker problems (undefined reference to \'YAML::LoadFile(std::basic_string

5条回答
  •  借酒劲吻你
    2020-12-19 18:26

    It's an ordering problem on the command-line. I guess I'll just never understand GCC command-line logic. Simply putting the library at the end seems to work:

    g++ -L/usr/local/lib -I/usr/local/include -std=c++0x -o $@  $^ -lyaml-cpp
    

提交回复
热议问题