The mutex/thread Implementation of GCC 4.6 may have some problems. As a result, when mutex/thread is used, the chrono compilation error may occur and the prompt cannot be prompted. after research, clang 3.1 supports libc ++ mutex/thread and switches STL implementation to libc ++. it is easy to install. After compilation is complete, set libc ++. so. copy XXX to/usr/lib, create a soft connection, and copy the header file of libc ++ to/usr/include/C ++/V1.
During compilation, you only need to add the parameter-stdlib = libc ++. If you want to use the C ++ 11 content such as mutex/thread, you need to add the parameter-STD = C ++ 11.
However, clang complete still finds the path/usr/include/C ++/4.6/by default, finds the implementation of libstdc ++, and continues to intelligently prompt that it cannot .... through grep, we found that clang complete will help you produce a cache file and record the path of the clang header file. the configured header file is loaded by default.
So,
1. you can directly modify this configuration file (. vim/autoload/getopts/CPP. clang. cache), add the libc ++ directory,-I/usr/include/C ++/V1/
2. Modify. Vim/autoload/getopts/clang. Vim. Modify:
Let L: optfunc ='Echo | clang-v-e-x'. Getopts # cache # getlangname ().'-'Replace with Let L: optfunc='Echo | clang-stdlib = C ++-v-e-x'. Getopts # cache # getlangname ().'-'
Delete the CPP. Clang. cache file.
PS:
Today, I submitted this bug to clang complete, and I just fixed it:-d
High Efficiency