When enabling C++11 with stdlibc++ 4.7, clang error out, while gcc compiles fine

后端 未结 3 1859
萌比男神i
萌比男神i 2020-12-10 05:26

I have been trying to get C++11 to work, after browsing different websites and Q/A, i am still having trouble with. I want to use clang with libstdc++. It is indicated in th

3条回答
  •  Happy的楠姐
    2020-12-10 06:30

    I'm using clang-3.1 with gcc4.6 libstdc++ on FreeBSD 9.0/AMD64. It works with these options:

    -I/usr/local/lib/gcc46/include/c++ \
    -I/usr/local/lib/gcc46/include/c++/x86_64-portbld-freebsd9.0 \
    -L/usr/local/lib/gcc46
    

    I guess your problem may be solved to use these options:

    -I/opt/local/include/gcc47/c++ \
    -I/opt/local/include/gcc47/c++/x86_64-apple-darwin11.3.0 \
    -L/opt/local/lib/gcc47
    

提交回复
热议问题