This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc and Win32 API



Hello,

I am running Cygwin 1.1.4 and my primary interest in Cygwin is in being
able to compile Win32 programs under a Unix environment using the gcc
compiler if possible. I have the classic book on the Win32 API by Charles
Petzold and have copied down his second example verbatim from Chapter 3.
The program compiled fine under the lcc compiler but when I try with gcc
the linker ld complains about unresolved symbols. I can provide the
exact error message if necessary. All I did to compile my source file
was the following:

gcc hello.c

All the program does is it includes windows.h, defines a window class,
registers it, creates a window of that class, displays it, and enters
a message loop, and the window procedure does not much more than display
a hello world type message in a MessageBox.

So, do I have to provide special compiler flags to gcc. The first example
from Petzold (which does not use window "classes"), compiles fine under
gcc, so what is going on?

Thanks,

Neil


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]