niosus / EasyClangComplete

:boom: Robust C/C++ code completion for Sublime Text 3/4
https://niosus.github.io/EasyClangComplete/
MIT License
575 stars 78 forks source link

Cannot use GCC #773

Open qinym-d opened 10 months ago

qinym-d commented 10 months ago

I have configured according to the document:

  "common_flags": [
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\include\\c++",
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\include\\c++\\x86_64-w64-mingw32",
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\include\\c++\\backward",
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\include",
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\include-fixed",
    "-IH:\\TDM-GCC\\bin\\lib\\gcc\\x86_64-w64-mingw32\\10.3.0\\x86_64-w64-mingw32\\include"
  ],

But when I type #include, I can't use my configured GCC, it's still LLVM。

Like this:

1703006740851

What can I do to sovel this problem?

niosus commented 10 months ago

Thanks for giving it a try. If I understand correctly you're trying to use GCC to perform completion and trying to configure the plugin for that.

Unfortunately this is impossible and I probably communicated the intent in the setup badly.

This plugin will always use libclang as this is the only tool that allows for easy auto completion. What I meant in the setup is that sometimes we need to provide certain folders to clang so that it is at all able to compile the code written with GCC in mind. Does this make sense?

qinym-d commented 10 months ago

Thanks for giving it a try. If I understand correctly you're trying to use GCC to perform completion and trying to configure the plugin for that.

Unfortunately this is impossible and I probably communicated the intent in the setup badly.

This plugin will always use libclang as this is the only tool that allows for easy auto completion. What I meant in the setup is that sometimes we need to provide certain folders to clang so that it is at all able to compile the code written with GCC in mind. Does this make sense?

Thank you very much for your help! Your Package is great, but I usually code in GCC and don't know Clang, so I apologize for asking such a low-level question here.

niosus commented 9 months ago

No worries at all. The way it works is that you can still use gcc when compiling your code manually just as you did before, but the plugin will use clang under the hood. Usually everything works just fine as clang is by design pretty compatible with gcc.