“Unresolved inclusion” error with Eclipse CDT for C standard library headers

前端 未结 14 2327
甜味超标
甜味超标 2020-11-28 04:18

I set up CDT for eclipse and wrote a simple hello world C program:

#include 

int main(void){
    puts(\"Hello, world.\");
    return 0;
}
         


        
14条回答
  •  猫巷女王i
    2020-11-28 05:12

    just adding to the knowledge base, i just did this on win7 with cygwin.

    this is what seems to work for me.

    include paths for c:

    D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include
    D:\dev\cygwin\usr\include
    

    include paths for c++:

    D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include
    D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\c++
    D:\dev\cygwin\usr\include
    

    this gets me a clean compile of hello world.

提交回复
热议问题