Kartik
Kartik

Reputation: 9853

Eclipse stdio.h error

I just downloaded eclipse and made a new c project.

This is my code:

#include <stdio.h>

int main()
{
    printf("hello");
}

It's giving me an error saying that stdio.h library is not found. How can I fix this so that my code runs and compiles?

I am running this on windows 7.

Upvotes: 0

Views: 7007

Answers (3)

Kane
Kane

Reputation: 8172

Install Wascana from your eclipse that packages mingw and msys

Upvotes: 0

Subbu
Subbu

Reputation: 43

Hope you have Eclipse CDT plugins installed? Go to "Help > Install New Software" and click on "already installed" link to see the list of installed features/plugins in your current installation. Look for "CDT" in this list. If not present then use the p2 repository URL given here in your "Install New Software" dialog to get it installed. You should be good to compile C/C++ projects after this.

Upvotes: 0

Thomas Dignan
Thomas Dignan

Reputation: 7102

That depends on your platform. It's likely that you don't even have a C compiler installed if this is happening. You can probably fix this by installing GCC, but the instructions will vary depending on your OS.

Upvotes: 4

Related Questions