When I tried to use NCM with clang_complete, I got the following error,
[ERROR] Loading libclang failed. Are you sure 'XXXXXXX' contains libclang?
I'm pretty sure I've already set the right path, so I want to find why this happens. I found the string in clang_complete\pythonx\libclang.py, which is in the except statement. I changed the code to print the exception, the exception is,
Error 193 occurs when 32bits python uses 64bits library, or vice versa. I used procexp and found NVM was running the clang_complete channel with Python 2. As shown in the screenshot,
I have a 32bits Python 2.7 and a 64bits Python 3.6 on my Windows system, I have set g:python3_host_prog and g:python_host_prog, and also let g:loaded_python_provider = 1 to disable the Python 2 version.
If I comment out the the g:python_host_prog, the clang_channel will not start at all.
Here is the dump for g:_cm_sources. It shows that clang_complete is using python2 channel, which is not correct.
I finally found this is because roxma/clang_complete/pythonx/cm_sources/clang_complete.py registering it as python2. I think it is better to register it as python3, as NCM is using Python 3, and clang_complete has already support Python 3.
When I tried to use NCM with clang_complete, I got the following error,
I'm pretty sure I've already set the right path, so I want to find why this happens. I found the string in
clang_complete\pythonx\libclang.py
, which is in the except statement. I changed the code to print the exception, the exception is,Error 193 occurs when 32bits python uses 64bits library, or vice versa. I used procexp and found NVM was running the clang_complete channel with Python 2. As shown in the screenshot,
I have a 32bits Python 2.7 and a 64bits Python 3.6 on my Windows system, I have set
g:python3_host_prog
andg:python_host_prog
, and alsolet g:loaded_python_provider = 1
to disable the Python 2 version.If I comment out the the
g:python_host_prog
, the clang_channel will not start at all.Here is the dump for
g:_cm_sources
. It shows that clang_complete is using python2 channel, which is not correct.I finally found this is because roxma/clang_complete/pythonx/cm_sources/clang_complete.py registering it as python2. I think it is better to register it as python3, as NCM is using Python 3, and clang_complete has already support Python 3.