简体   繁体   English

Eclipse CDT 未显示来自 docker Container 的包含

[英]Eclipse CDT not showing includes from docker Container

I have setup eclipse cdt to build the binary using a docker container.我已经设置了 eclipse cdt 来使用 docker 容器构建二进制文件。 The container is an Ubuntu image where simply is an arm-none-eabi cross toolchain installed.该容器是一个 Ubuntu 映像,其中安装了一个 arm-none-eabi 交叉工具链。 It is compiling fine and is finding all standard includes like "stdio.h" "stdint.h" etc. in the container while compiling.它编译得很好,并且在编译时发现容器中的所有标准包括“stdio.h”“stdint.h”等。 The only problem is, that eclipse is not showing those includes and I get a warning for every header that the files are not found and I cannot jump to the source files.唯一的问题是,eclipse 没有显示那些包含,并且我收到每个标头的警告,提示找不到文件并且我无法跳转到源文件。

Do I have to do something special in the container like mounting the include paths to the host system because all I can find on the Internet are solutions where eclipse seems to automatically find the include paths inside the docker container?我是否必须在容器中做一些特殊的事情,比如将包含路径安装到主机系统,因为我在 Internet 上可以找到的所有解决方案都是 eclipse 似乎自动找到 docker 容器内的包含路径的解决方案?

Again, compiling works fine, only eclipse is not showing the include paths inside the container and giving me warnings.同样,编译工作正常,只有 eclipse 没有显示容器内的包含路径并给我警告。

Thanks谢谢

Ok, so it seems like it is a bug in Eclipse...好的,所以它似乎是 Eclipse 中的一个错误......

You simply need to restart Eclipse and it shows the includes and the warnings are gone.您只需要重新启动 Eclipse,它就会显示包含并且警告消失了。 Re-Indexing is not enough, it needs to be restarted...重新索引是不够的,它需要重新启动...

Duh...呃...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM