This is the mail archive of the cygwin@sourceware.cygnus.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]

problems building GUI application


I am having problems getting a working GUI application with cygwin32 :(

here is the test.cpp file i am trying to compile
--------------------------------------------------------
// windows test
#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR
lpCmdLine,int nCmdShow)
{
    MessageBox(NULL,"blah","blah",MB_OK);
    return 0;
}
--------------------------------------------------------

this is the command line i use to build it:
"g++ -o test.exe test.cpp -Wl,--subsystem,windows -lcygwin -lkernel32
-lgdi32 -luser32"

During the build there is the link warning: "cannot find entry symbol
_WinMainCRTStartup; defaulting to 00401000", and the resulting EXE
explodes when run >B)

Why isnt it working? I am stumped here, please help (btw. console apps
compile and execute with no problems, and this same test.cpp compiles
fine with VC++)


cheers
--
Gaffer [xtatic]
gaffer@bigfoot.com

6800A007B013CD104F33C0B13FAA40A7E2FB57B1C0AB47E2FC5F4779ECB81210
99B1FFCD10061E0741BF8001B3638B857F0202C40F92C48A95810203C28A9500
0503C2C1E802740148AA03C2D1E888853F01E2DAB9400103F94B75D2E5400FC1
0600018AE0ABABE2F30733FFBEC002B53CF366A5B401CD1674ABB80300CD10C3
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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