Eclipse C/C function 'printf' could not be resolved

前端 未结 2 975
刺人心
刺人心 2021-01-21 01:46

I\'m trying to set up a C/C++ development environment on Eclipse.

I installed the following Eclipse plugins:

  • C/C++ development tools SDK
  • Library A
2条回答
  •  自闭症患者
    2021-01-21 02:16

    You must include above your main(). This should solve it:

    #include 
    int main() {
        printf("Hello World!!!");
        return 0;
    }
    

    Sometimes, Eclipse's parser gets stupid. You can try reparsing the project. Right click on your project then → IndexRebuild. After rebuild, most likely the symbols will be recognized.

提交回复
热议问题