delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/03/23:40:42

From: gaffer AT zip DOT com DOT au (Gaffer)
Subject: problems building GUI application
3 Nov 1997 23:40:42 -0800 :
Message-ID: <345ECB23.78843DB9.cygnus.gnu-win32@zip.com.au>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

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 AT bigfoot DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019