Problem with building code in C [message #902696] |
Sun, 19 August 2012 20:39 |
tal man Messages: 1 Registered: August 2012 |
Junior Member |
|
|
Hi, I'm quite a beginner, I've recently finished a course of intro to C in which we were using Code::Blocks, and now in the more advanced course they told us to switch to Eclipse, I've installed the program along with MinGW, and everything else that the installation guide told me to install, but i have a problem when trying to build even very simple code, (code that works in code::blocks) it always gives me this message:
**** Build of configuration Debug for project DecToBin ****
**** Internal Builder is used for build ****
gcc -o DecToBin.exe main.o
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o): In function `main':
C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 234 ms.
the code used to produce this example was:
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
printf("%d", n);
return 0;
}
and in case this is needed this is the PATH i have set up:
C:\MinGW\bin;C:\Modeltech_pe_edu_10.1a\win32pe_edu;c:\mingw\msys\1.0\bin
I searched the forum and have noticed that the question has been asked many times before but any answer i could find was way over my head, ism in no way a programmer, i just know some basic C, would be really happy to get some help with this
thanks!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02386 seconds