Eclipse CDT Inclusion problems

白昼怎懂夜的黑 提交于 2021-01-29 20:07:56

问题


I just installed Eclipse CDT. Now, Eclipse works fine for me with Java, but it's not working at all with C. I'm trying to write a simple Hello World program, and I've even loaded the Hello World ANSI premade project. However, regardless of what I do, I get a "Unresolved Inclusion: _" error on all my #include.

I've looked around for half an hour trying to figure out why, installed MiniGW and tried a ton of different configurations. Can someone tell me how to fix this? I'm guessing it's because Eclipse has no idea where the .h files are. How do I set this?

I'm on Windows 7.

Thanks!


回答1:


Go to the project property (right click on the project in the left panel) then C/C++ General then Paths & Symbols.

You can configure the include paths in the Include tab (the first one normally).

The include paths must be something like $MINGW_DIR/include or something like that (can't be more precise, for me it's /usr/include so...)



来源:https://stackoverflow.com/questions/7868166/eclipse-cdt-inclusion-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!