CLion add automatically include file without my confirm

Answered

CLion 2023.1.3


In Mac,

for example,
if i want to use "uint8_t" on my project ,i type "uint8_t" ,then clion hint:

then i chose first selection. What bother me is clion add automatically a include file in my project without my confirm:

i don`t want use this file, this file belong MacOS,my project is supposed to run on Linux.However, my project is also include the file that contain "uint8_t".How to close this Automatic addition.

0
1 comment

Hello!

>How to close this Automatic addition.

Go to `Preferences | Editor | General | Auto Import` and disable `C/C++ | Auto import in completion`.

>my project is supposed to run on Linux

Generally, in such cases it's better to use a proper toolchain (a Linux one) so that smart code features can work correctly. It can be a "Remote Host" toolchain or a Docker toolchain depending on where you build the project.

1

Please sign in to leave a comment.