Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use GCC #773

Open
qinym-d opened this issue Dec 19, 2023 · 3 comments
Open

Cannot use GCC #773

qinym-d opened this issue Dec 19, 2023 · 3 comments

Comments

@qinym-d
Copy link

qinym-d commented Dec 19, 2023

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
Copy link
Owner

niosus commented Dec 22, 2023

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
Copy link
Author

qinym-d commented Dec 22, 2023

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
Copy link
Owner

niosus commented Jan 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants