问题
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