编译ycm库
在安裝完YCM之后,重新打開vim還會出現如下的報錯信息:ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it. Read the docs!
這個就可以通過在~/.vim/bundle/YouCompleteMe,即你的YCM目錄下,加入如下命令解決:
[plain]?view plaincopy?
然后可能還會出現報錯:Some folders in /home/sky-tm/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party are empty; you probably forgot to run:?? ?git submodule update --init --recursive怎么辦?
莫慌,按照提示來:
繼續(xù)輸入命令:
?git submodule update --init --recursive
然后就等它更新完成。
然后,再輸入:
?
[plain]?view plaincopy?
如果這是時候會出現這樣的情況:
?
主要就是:
-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build.mI4VZH/CMakeFiles/CMakeOutput.log".
和
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
? Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
? (Required is at least version "2.6")
Call Stack (most recent call first):
? /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
? /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
? BoostParts/CMakeLists.txt:30 (find_package)
這是因為python安裝的不完全導致的,因為python3和python2是不兼容的。
這時候我們要怎么辦呢?
我用了最簡單粗暴的方法:
?
[plain]?view plaincopy?
?
再出現了一堆進度提示之后就有了下面三行:
[100%] Built target ycm_core
Scanning dependencies of target ycm_support_libs
[100%] Built target ycm_support_libs
這樣就表示成功啦。
總結
- 上一篇: 传统定时器使用
- 下一篇: 《FPGA全程进阶---实战演练》第一章