Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Win32 API and MinGW

Name: Anonymous 2010-03-24 20:44

Hey /prog/,

I'm just getting started with win32 API programming in C++ and I'm having trouble compiling the winnie tutorial (http://www.relisoft.com/win32/winnie.html) with MinGW.

My input and output:

C:\Users\Eric\Projects> g++ winnie.cpp -o winnie.exe

/mingw/lib/libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to 'WinMain@16'
collect2: ld returned 1 exit status


Any help would be very much appreciated.

Name: Anonymous 2010-03-24 20:57

Name: Anonymous 2010-03-24 21:01

>>2
Yeah, because I didn't already google it for myself. Thanks.

Name: Anonymous 2010-03-24 21:03

Name: Anonymous 2010-03-24 21:06

Name: Anonymous 2010-03-24 21:20

>>5
Didn't help, but thanks anyway.

Name: Anonymous 2010-03-24 21:37

Use a real OS, all problems solved.

Name: Anonymous 2010-03-24 21:52

Use MSVC if you want to do Win32 coding. You can do it in gcc if you really want, but MSVC is the superior C and SEPPLES compiler for Windows.

Name: Anonymous 2010-03-25 0:16

MSVC is not a C compiler

Name: Anonymous 2010-03-25 0:24

>>1
Just follow a different tutorial; that one is horribly outdated.

Try googling "minGW c++ windows example" or similar

Name: Anonymous 2010-03-25 1:23

>>9
Microsoft's C/C++ Optimizing Compiler, happy now?

Name: Anonymous 2010-03-25 8:32

>>11
Yes, very much so.

Name: Anonymous 2010-03-25 12:08

s/WinMain@16/main/

Don't change these.
Name: Email:
Entire Thread Thread List