hovatterz / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

clang++ -stdlib=libc++ linker error #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compiles fine if not using libc++

clang++ -stdlib=libc++  t.cpp  -L. -lyaml-cpp
/tmp/t-eed552.o: In function `main':
t.cpp:(.text+0x79): undefined reference to 
`YAML::LoadFile(std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char> > const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

<t.cpp>

#include "include/yaml-cpp/yaml.h"

int main(void)
{
    YAML::Node config = YAML::LoadFile("config.yaml");
    return 0;
}

</t.cpp>

Original issue reported on code.google.com by dgalli...@gmail.com on 26 Nov 2014 at 2:55

GoogleCodeExporter commented 9 years ago
I think you'll have to have built yaml-cpp using libc++. Can you describe how 
you built yaml-cpp?

Original comment by jbe...@gmail.com on 24 Dec 2014 at 6:40

GoogleCodeExporter commented 9 years ago

Original comment by jbe...@gmail.com on 29 Mar 2015 at 7:34