[Vim] clang complete cannot intelligently prompt the mutex/thread solution (please obtain the latest clang complete)

Source: Internet
Author: User
Tags autoload

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.