Raj Hunzai
Raj Hunzai

Reputation: 11

Eclipse error in C project

I am new to C programming. I just installed Eclipse CDT and Cygwin. I tried to run this code. But showing 3 errors in problems window of eclipse.

Errors:

1- make:***[CProject.exe]Error 1
2- recipe for target 'Cproject.exe'failed
3- Undefined reference to 'WinMain@16'  

Code:

#include<stdio.h>
int main(void)
{
printf("I want to be a competent C programmer");
return 0;
}

I don't know what to do, Can anyone help me?

Upvotes: 0

Views: 45

Answers (2)

albttx
albttx

Reputation: 3784

Try to compile and execute it with you're command line,

gcc yourfile.c
./a.out

if you don't have gcc, you can install it there : http://www.matpack.de/cygwin/index.html

Upvotes: 0

Magisch
Magisch

Reputation: 7352

Set the project type to console application and try again.

Upvotes: 1

Related Questions