when I try to compile a program it gives me this error during the linking part
Code:\mingw\lib\libmingw32.a(main.o):main.c:(.text+0xd2)||undefined reference to `_WinMain@16'|
when I try to compile a program it gives me this error during the linking part
Code:\mingw\lib\libmingw32.a(main.o):main.c:(.text+0xd2)||undefined reference to `_WinMain@16'|
You have to tell the compiler that you are compiling a Windows GUI program.
Otherwise it thinks you are trying to compile a console program and you will get the above error.
Add this to your compiler flags "-mwindows"
Or if you aren't using the command line you will have to tell your IDE that you want a GUI
program not a console one.
I'm not sure whether the above posters advice would solve your problem, but that error is the exact same that i get when i forget to define main correcty:
Your int main() must look like the above for SDL to work...Code:int main(int argc, char *argv[])
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.