lvzixun / Clang-Complete

a auto complete plugin for sublimetext3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows平台编译报错

sindney opened this issue · comments

ST3是64位的,编译器是gcc 4.9.2(gcc-tdm-64)
编译时报错:

ld.exe: skipping incompatible libclang.dll when searching for -lclang
ld.exe: cannot find -lclang

修改Makefile,CFLAGS加-m32,编译成功。
但是ST中加载Plugin失败:

  libcc = cdll.LoadLibrary("%s/lib/libcc.dll" % current_path)
  File "./ctypes/__init__.py", line 431, in LoadLibrary
  File "./ctypes/__init__.py", line 353, in __init__
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

是什么问题呢

You are using 32-bit dll with 64-bit python(ST3) and this probably cause the error.
Try -m64 instead of -m32.

I encountered the same problem with you.I can build successful by using the windows branch,but the plugin can be loaded successfully in ST3. The error information was as same as yours.I had tried @eternalphane 's solution,add -m64 in makefile,it can't be built successfully and said :sorry,unimplemented: 64-bit mode not compiled in.
Can you give me some suggestions?

@Jeffrey95 You can try using 64-bit gcc compiler. (e.g. install mingw-w64 64-bit instead of mingw-w64 32-bit mentioned in README.md)