public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bug in GUI App WinMain Arguements
@ 2003-04-04 18:54 BB
  2003-04-04 19:14 ` Martin
  2003-04-04 21:18 ` Max Bowsher
  0 siblings, 2 replies; 10+ messages in thread
From: BB @ 2003-04-04 18:54 UTC (permalink / raw)
  To: cygwin

I'm having a problem running a windows gui app with arguments from a mounted
directory if the Win32Path mounted to contains blanks. (i.e. mount -s -b
"C:/foo bar" "/foobar"). It's not a mount specific problem because it also
occurs if the directory has a space in it.  Since mkpasswd defaulted my home
directory to "/cygdrive/c/Documents and Settings/cygusr", I am assuming
Cygwin supports directories with spaces in them.  I have included a small
program that illustrates the bug.

By the way, I'm running on XP with the latest version of Cygwin newly
installed.

Also, according to the "Cygwin Users Guide", I have included the following
line in the code.
WinMainCRTStartup() { mainCRTStartup(); }
It doesnt seem to be called.  Is the User Guide correct? The same problem
occurs if I omit the line and use the "-e _mainCRTStartup" as suggested in
the User Guide.

Any suggestions?
BB.

Assuming the program listed below (prtcmdline.exe) is in
"/cygdrive/c/Documents and Settings/cygusr"...

$ cd ~
$ pwd
/cygdrive/c/Documents and Settings/cygusr
$ ./prtcmdline arg1 arg2 | tail -
default
and Settings\cygusr\prtcmdline.exe" arg1 arg2      << wrong
$ cp prtcmdline.exe /home/cygusr
$ /home/cygusr/prtcmdline arg1 arg2 | tail -
default
arg1 arg2                       <<right
$

/****************************************************/
/* prtcmdline.c                                     */
/* gcc -mwindows prtcmdline.c -o prtcmdline.exe     */
/****************************************************/
#include <windows.h>
#include <stdio.h>

char *gstr = "default\r";

WinMainCRTStartup()
{
 gstr = "WinMainCRTStartup() called\r";
 mainCRTStartup();
}

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 puts(gstr);
 puts(lpCmdLine);
 return 0;
}
/****************************************************/







--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 18:54 Bug in GUI App WinMain Arguements BB
@ 2003-04-04 19:14 ` Martin
  2003-04-04 19:32   ` BB
  2003-04-04 21:18 ` Max Bowsher
  1 sibling, 1 reply; 10+ messages in thread
From: Martin @ 2003-04-04 19:14 UTC (permalink / raw)
  To: BB; +Cc: cygwin

here is the workaround we use in Ant build (which by the way outclasses
anything any make can do)
/cygdrive/c/Documents and Settings/cygusr           //becomes
/cygdrive/c/DOCUME~1\cyguser          //workaround for 95/98 inability to
handle spaces in directory name

Martin
----- Original Message -----
From: "BB" <canofspam@att.net>
To: <cygwin@cygwin.com>
Sent: Friday, April 04, 2003 10:34 AM
Subject: Bug in GUI App WinMain Arguements


> I'm having a problem running a windows gui app with arguments from a
mounted
> directory if the Win32Path mounted to contains blanks. (i.e. mount -s -b
> "C:/foo bar" "/foobar"). It's not a mount specific problem because it also
> occurs if the directory has a space in it.  Since mkpasswd defaulted my
home
> directory to "/cygdrive/c/Documents and Settings/cygusr", I am assuming
> Cygwin supports directories with spaces in them.  I have included a small
> program that illustrates the bug.
>
> By the way, I'm running on XP with the latest version of Cygwin newly
> installed.
>
> Also, according to the "Cygwin Users Guide", I have included the following
> line in the code.
> WinMainCRTStartup() { mainCRTStartup(); }
> It doesnt seem to be called.  Is the User Guide correct? The same problem
> occurs if I omit the line and use the "-e _mainCRTStartup" as suggested in
> the User Guide.
>
> Any suggestions?
> BB.
>
> Assuming the program listed below (prtcmdline.exe) is in
> "/cygdrive/c/Documents and Settings/cygusr"...
>
> $ cd ~
> $ pwd
> /cygdrive/c/Documents and Settings/cygusr
> $ ./prtcmdline arg1 arg2 | tail -
> default
> and Settings\cygusr\prtcmdline.exe" arg1 arg2      << wrong
> $ cp prtcmdline.exe /home/cygusr
> $ /home/cygusr/prtcmdline arg1 arg2 | tail -
> default
> arg1 arg2                       <<right
> $
>
> /****************************************************/
> /* prtcmdline.c                                     */
> /* gcc -mwindows prtcmdline.c -o prtcmdline.exe     */
> /****************************************************/
> #include <windows.h>
> #include <stdio.h>
>
> char *gstr = "default\r";
>
> WinMainCRTStartup()
> {
>  gstr = "WinMainCRTStartup() called\r";
>  mainCRTStartup();
> }
>
> int APIENTRY WinMain(HINSTANCE hInstance,
>                      HINSTANCE hPrevInstance,
>                      LPSTR     lpCmdLine,
>                      int       nCmdShow)
> {
>  puts(gstr);
>  puts(lpCmdLine);
>  return 0;
> }
> /****************************************************/
>
>
>
>
>
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 19:14 ` Martin
@ 2003-04-04 19:32   ` BB
  2003-04-04 20:01     ` Christopher Faylor
  0 siblings, 1 reply; 10+ messages in thread
From: BB @ 2003-04-04 19:32 UTC (permalink / raw)
  To: cygwin

I added a call to GetCommadLine() to see what it returns. It correctly
quotes the directory with spaces in it, so the caller of WinMain() should
easily be able to handle it.  Win95 does too.

From "/home/cygusr"
GetCommandLine() returns [C:\cygwin\home\bkash\prtcmdline\prtcmdline.exe
arg1 arg]

From "/cygdrive/c/Documents and Settings/cygusr"
GetCommandLine() returns ["c:\Documents and Settings\bkash\prtcmdline.exe"
arg1 arg2]

"Martin" <mgainty@hotmail.com> wrote in message
news:OE19Dc41W2ufyWOxbCJ000162eb@hotmail.com...
> here is the workaround we use in Ant build (which by the way outclasses
> anything any make can do)
> /cygdrive/c/Documents and Settings/cygusr           //becomes
> /cygdrive/c/DOCUME~1\cyguser          //workaround for 95/98 inability to
> handle spaces in directory name
>
> Martin
> ----- Original Message -----
> From: "BB" <canofspam@att.net>
> To: <cygwin@cygwin.com>
> Sent: Friday, April 04, 2003 10:34 AM
> Subject: Bug in GUI App WinMain Arguements
>
>
> > I'm having a problem running a windows gui app with arguments from a
> mounted
> > directory if the Win32Path mounted to contains blanks. (i.e. mount -s -b
> > "C:/foo bar" "/foobar"). It's not a mount specific problem because it
also
> > occurs if the directory has a space in it.  Since mkpasswd defaulted my
> home
> > directory to "/cygdrive/c/Documents and Settings/cygusr", I am assuming
> > Cygwin supports directories with spaces in them.  I have included a
small
> > program that illustrates the bug.
> >
> > By the way, I'm running on XP with the latest version of Cygwin newly
> > installed.
> >
> > Also, according to the "Cygwin Users Guide", I have included the
following
> > line in the code.
> > WinMainCRTStartup() { mainCRTStartup(); }
> > It doesnt seem to be called.  Is the User Guide correct? The same
problem
> > occurs if I omit the line and use the "-e _mainCRTStartup" as suggested
in
> > the User Guide.
> >
> > Any suggestions?
> > BB.
> >
> > Assuming the program listed below (prtcmdline.exe) is in
> > "/cygdrive/c/Documents and Settings/cygusr"...
> >
> > $ cd ~
> > $ pwd
> > /cygdrive/c/Documents and Settings/cygusr
> > $ ./prtcmdline arg1 arg2 | tail -
> > default
> > and Settings\cygusr\prtcmdline.exe" arg1 arg2      << wrong
> > $ cp prtcmdline.exe /home/cygusr
> > $ /home/cygusr/prtcmdline arg1 arg2 | tail -
> > default
> > arg1 arg2                       <<right
> > $
> >
> > /****************************************************/
> > /* prtcmdline.c                                     */
> > /* gcc -mwindows prtcmdline.c -o prtcmdline.exe     */
> > /****************************************************/
> > #include <windows.h>
> > #include <stdio.h>
> >
> > char *gstr = "default\r";
> >
> > WinMainCRTStartup()
> > {
> >  gstr = "WinMainCRTStartup() called\r";
> >  mainCRTStartup();
> > }
> >
> > int APIENTRY WinMain(HINSTANCE hInstance,
> >                      HINSTANCE hPrevInstance,
> >                      LPSTR     lpCmdLine,
> >                      int       nCmdShow)
> > {
> >  puts(gstr);
> >  puts(lpCmdLine);
> >  return 0;
> > }
> > /****************************************************/
> >
> >
> >
> >
> >
> >
> >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> >
> >
>




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 19:32   ` BB
@ 2003-04-04 20:01     ` Christopher Faylor
  2003-04-07 21:42       ` BB
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Faylor @ 2003-04-04 20:01 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 04, 2003 at 12:08:46PM -0600, BB wrote:
>I added a call to GetCommadLine() to see what it returns. It correctly
>quotes the directory with spaces in it, so the caller of WinMain() should
>easily be able to handle it.  Win95 does too.

Sounds like a really simple patch then.  Looking forward to it.

cgf
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 18:54 Bug in GUI App WinMain Arguements BB
  2003-04-04 19:14 ` Martin
@ 2003-04-04 21:18 ` Max Bowsher
  2003-04-05 16:52   ` Joshua Daniel Franklin
  1 sibling, 1 reply; 10+ messages in thread
From: Max Bowsher @ 2003-04-04 21:18 UTC (permalink / raw)
  To: BB, cygwin

BB wrote:
> I'm having a problem running a windows gui app with arguments from a
> mounted directory if the Win32Path mounted to contains blanks. (i.e.
> mount -s -b "C:/foo bar" "/foobar"). It's not a mount specific problem
> because it also occurs if the directory has a space in it.  Since
> mkpasswd defaulted my home directory to "/cygdrive/c/Documents and
> Settings/cygusr", I am assuming Cygwin supports directories with spaces
> in them.

Cygwin is a collection of many programs and scripts. Some of them don't
support spaces in directory names. Therefore, it is advisable to avoid using
spaces.

The default home dir is not in "Documents and Settings". Cygwin is noticing
that you have HOME set in your environment, and using that. You probably
don't want that. Why is HOME set?

>  I have included a small program that illustrates the bug.
>
> By the way, I'm running on XP with the latest version of Cygwin newly
> installed.
>
> Also, according to the "Cygwin Users Guide", I have included the following
> line in the code.
> WinMainCRTStartup() { mainCRTStartup(); }
> It doesnt seem to be called.  Is the User Guide correct? The same problem
> occurs if I omit the line and use the "-e _mainCRTStartup" as suggested in
> the User Guide.

This sounds like out-of-date info to me (but that's just a guess).

> Any suggestions?

There seems to be a bug in Cygwin.
The following are unrelated to the bug:
- HOME directory
- "| tail -"
- WinMainCRTStartup
- gstr
- -mwindows

I have snipped your testcase appropriately.

You can easily show that the bug is in Cygwin, as it does not occur when the
testcase is compiled with -mno-cygwin.

> $ pwd
> /cygdrive/c/Documents and Settings/cygusr
> $ ./prtcmdline arg1 arg2
> and Settings\cygusr\prtcmdline.exe" arg1 arg2      << wrong
> $ cp prtcmdline.exe /home/cygusr
> $ /home/cygusr/prtcmdline arg1 arg2
> arg1 arg2                       <<right
> $
>
> /****************************************************/
> /* prtcmdline.c                                     */
> /* gcc prtcmdline.c -o prtcmdline.exe               */
> /****************************************************/
> #include <windows.h>
> #include <stdio.h>
>
> int APIENTRY WinMain(HINSTANCE hInstance,
>                      HINSTANCE hPrevInstance,
>                      LPSTR     lpCmdLine,
>                      int       nCmdShow)
> {
>  puts(lpCmdLine);
>  return 0;
> }
> /****************************************************/

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 21:18 ` Max Bowsher
@ 2003-04-05 16:52   ` Joshua Daniel Franklin
  2003-04-08 16:43     ` Bug in GUI App WinMain Arguments BB
  0 siblings, 1 reply; 10+ messages in thread
From: Joshua Daniel Franklin @ 2003-04-05 16:52 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 04, 2003 at 07:58:27PM +0100, Max Bowsher wrote:
> BB wrote:
> > Also, according to the "Cygwin Users Guide", I have included the following
> > line in the code.
> > WinMainCRTStartup() { mainCRTStartup(); }
> > It doesnt seem to be called.  Is the User Guide correct? The same problem
> > occurs if I omit the line and use the "-e _mainCRTStartup" as suggested in
> > the User Guide.
> 
> This sounds like out-of-date info to me (but that's just a guess).

OK, I'd like to make sure this is up-to-date, but I've never built a 
GUI Win32 application in Cygwin (well, except setup.exe). Can someone 
post a "helloworld-gui" example or something? Or, here's what the User's
Guide currently says, please reply with inaccuracies: 

GUI Mode Applications

Cygwin allows you to build programs with full access to the standard Windows 32-bit API, including the GUI functions as defined in any Microsoft or off-the-shelf publication. However, the process of building those applications is slightly different, as you'll be using the GNU tools instead of the Microsoft tools.

For the most part, your sources won't need to change at all. However, you should remove all __export attributes from functions and replace them like this:

int foo (int) __attribute__ ((__dllexport__));

int
foo (int i)

For most cases, you can just remove the __export and leave it at that. For convenience sake, you might want to include the following code snippet when compiling GUI programs. If you don't, you will want to add "-e _mainCRTStartup" to your link line in your Makefile.

#ifdef __CYGWIN__
WinMainCRTStartup() { mainCRTStartup(); }
#endif

The Makefile is similar to any other UNIX-like Makefile, and like any other Cygwin makefile. The only difference is that you use gcc -mwindows to link your program into a GUI application instead of a command-line application. Here's an example:

myapp.exe : myapp.o myapp.res
	gcc -mwindows myapp.o myapp.res -o $@

myapp.res : myapp.rc resource.h
	windres $< -O coff -o $@

Note the use of windres to compile the Windows resources into a COFF-format .res file. That will include all the bitmaps, icons, and other resources you need, into one handy object file. Normally, if you omitted the "-O coff" it would create a Windows .res format file, but we can only link COFF objects. So, we tell windres to produce a COFF object, but for compatibility with the many examples that assume your linker can handle Windows resource files directly, we maintain the .res naming convention. For more information on windres, consult the Binutils manual. 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-04 20:01     ` Christopher Faylor
@ 2003-04-07 21:42       ` BB
  2003-04-07 23:19         ` Christopher Faylor
  0 siblings, 1 reply; 10+ messages in thread
From: BB @ 2003-04-07 21:42 UTC (permalink / raw)
  To: cygwin

It is.  I think you might have already written it. (From
"winsup/mingw/main.c" -  '$Author: cgf $')

"winsup/cygwin/lib/libcmain.c" doesn't check for a quoted first argument in
the GetCommandLineA() result.

"winsup/mingw/main.c" has a better implementation of main().

BB

"Christopher Faylor" <cgf-rcm@cygwin.com> wrote in message
news:20030404185413.GA12006@redhat.com...
> On Fri, Apr 04, 2003 at 12:08:46PM -0600, BB wrote:
> >I added a call to GetCommadLine() to see what it returns. It correctly
> >quotes the directory with spaces in it, so the caller of WinMain() should
> >easily be able to handle it.  Win95 does too.
>
> Sounds like a really simple patch then.  Looking forward to it.
>
> cgf
> --
> Please use the resources at cygwin.com rather than sending personal email.
> Special for spam email harvesters: send email to aaaspam@sourceware.org
> and be permanently blocked from mailing lists at sources.redhat.com
>




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguements
  2003-04-07 21:42       ` BB
@ 2003-04-07 23:19         ` Christopher Faylor
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2003-04-07 23:19 UTC (permalink / raw)
  To: cygwin

On Mon, Apr 07, 2003 at 02:42:08PM -0500, BB wrote:
>It is.  I think you might have already written it. (From
>"winsup/mingw/main.c" -  '$Author: cgf $')

The person who checks something into CVS isn't necessarily the author.

>"winsup/cygwin/lib/libcmain.c" doesn't check for a quoted first argument in
>the GetCommandLineA() result.
>
>"winsup/mingw/main.c" has a better implementation of main().

None of this is a patch.

cgf

>"Christopher Faylor" <cgf-rcm@cygwin.com> wrote in message
>news:20030404185413.GA12006@redhat.com...
>> On Fri, Apr 04, 2003 at 12:08:46PM -0600, BB wrote:
>> >I added a call to GetCommadLine() to see what it returns. It correctly
>> >quotes the directory with spaces in it, so the caller of WinMain() should
>> >easily be able to handle it.  Win95 does too.
>>
>> Sounds like a really simple patch then.  Looking forward to it.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguments
  2003-04-05 16:52   ` Joshua Daniel Franklin
@ 2003-04-08 16:43     ` BB
  2003-04-09 15:59       ` Joshua Daniel Franklin
  0 siblings, 1 reply; 10+ messages in thread
From: BB @ 2003-04-08 16:43 UTC (permalink / raw)
  To: cygwin

I have attached a GUI Win32 app.

It builds without either of the options (WinMainCRTStartup() or -e
mainCRTStartup) specified in the users guide.  I think the default
implementation of main() in calls WinMain(), so I wonder if the call to
mainCRTStartup is required.  Perhaps the FAQ is out of date.

If built with "-e WinMainCRTStartup" to set the entry point,
WinMainCRTStartup
gets called.

BB.

Running hello.exe
"Joshua Daniel Franklin" <joshuadfranklin@yahoo.com> wrote in message
news:20030405151952.GA276@world-gov...
> On Fri, Apr 04, 2003 at 07:58:27PM +0100, Max Bowsher wrote:
> > BB wrote:
> > > Also, according to the "Cygwin Users Guide", I have included the
following
> > > line in the code.
> > > WinMainCRTStartup() { mainCRTStartup(); }
> > > It doesnt seem to be called.  Is the User Guide correct? The same
problem
> > > occurs if I omit the line and use the "-e _mainCRTStartup" as
suggested in
> > > the User Guide.
> >
> > This sounds like out-of-date info to me (but that's just a guess).
>
> OK, I'd like to make sure this is up-to-date, but I've never built a
> GUI Win32 application in Cygwin (well, except setup.exe). Can someone
> post a "helloworld-gui" example or something? Or, here's what the User's
> Guide currently says, please reply with inaccuracies:
>
> GUI Mode Applications
>
> Cygwin allows you to build programs with full access to the standard
Windows 32-bit API, including the GUI functions as defined in any Microsoft
or off-the-shelf publication. However, the process of building those
applications is slightly different, as you'll be using the GNU tools instead
of the Microsoft tools.
>
> For the most part, your sources won't need to change at all. However, you
should remove all __export attributes from functions and replace them like
this:
>
> int foo (int) __attribute__ ((__dllexport__));
>
> int
> foo (int i)
>
> For most cases, you can just remove the __export and leave it at that. For
convenience sake, you might want to include the following code snippet when
compiling GUI programs. If you don't, you will want to add "-e
_mainCRTStartup" to your link line in your Makefile.
>
> #ifdef __CYGWIN__
> WinMainCRTStartup() { mainCRTStartup(); }
> #endif
>
> The Makefile is similar to any other UNIX-like Makefile, and like any
other Cygwin makefile. The only difference is that you use gcc -mwindows to
link your program into a GUI application instead of a command-line
application. Here's an example:
>
> myapp.exe : myapp.o myapp.res
> gcc -mwindows myapp.o myapp.res -o $@
>
> myapp.res : myapp.rc resource.h
> windres $< -O coff -o $@
>
> Note the use of windres to compile the Windows resources into a
COFF-format .res file. That will include all the bitmaps, icons, and other
resources you need, into one handy object file. Normally, if you omitted the
"-O coff" it would create a Windows .res format file, but we can only link
COFF objects. So, we tell windres to produce a COFF object, but for
compatibility with the many examples that assume your linker can handle
Windows resource files directly, we maintain the .res naming convention. For
more information on windres, consult the Binutils manual.
>




begin 666 hello.c
M+RHM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T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!74$%204T@=U!A<F%M+"!,4$%204T@;%!A<F%M*0I["@E004E.
M5%-44E5#5"!P<SL*"4A$0R!H9&,["@D*"7-W:71C:" H;65S<V%G92D@"@E[
M"@D)8V%S92!735]004E.5#H*"0D):&1C(#T@0F5G:6Y086EN="AH5VYD+" F
M<',I.PH)"0E214-4(')T.PH)"0E'971#;&EE;G1296-T*&A7;F0L("9R="D[
M"@D)"41R87=497AT*&AD8RP@9VQP<WI497AT+"!S=')L96XH9VQP<WI497AT
M*2P@)G)T+"!$5%]43U @?"!$5%],1494*3L*"0D)16YD4&%I;G0H:%=N9"P@
M)G!S*3L*"0D)8G)E86L["@D)8V%S92!735]$15-44D]9.@H)"0E0;W-T475I
M=$UE<W-A9V4H,"D["@D)"6)R96%K.PH)"61E9F%U;'0Z"@D)"7)E='5R;B!$
M9697:6YD;W=0<F]C*&A7;F0L(&UE<W-A9V4L('=087)A;2P@;%!A<F%M*3L*
1"7T*"7)E='5R;B P.PI]"@H`
`
end



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug in GUI App WinMain Arguments
  2003-04-08 16:43     ` Bug in GUI App WinMain Arguments BB
@ 2003-04-09 15:59       ` Joshua Daniel Franklin
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Daniel Franklin @ 2003-04-09 15:59 UTC (permalink / raw)
  To: cygwin

> > > > Also, according to the "Cygwin Users Guide", I have included the
> following
> > > > line in the code.
> > > > WinMainCRTStartup() { mainCRTStartup(); }
> > > > It doesnt seem to be called.  Is the User Guide correct? The same
> problem
> > > > occurs if I omit the line and use the "-e _mainCRTStartup" as
> suggested in
> > > > the User Guide.
> > >
> > > This sounds like out-of-date info to me (but that's just a guess).
> >
> > OK, I'd like to make sure this is up-to-date, but I've never built a
> > GUI Win32 application in Cygwin (well, except setup.exe). Can someone
> > post a "helloworld-gui" example or something? Or, here's what the User's
> > Guide currently says, please reply with inaccuracies:

On Tue, Apr 08, 2003 at 11:13:27AM -0500, BB wrote:
> I have attached a GUI Win32 app.
> 
> It builds without either of the options (WinMainCRTStartup() or -e
> mainCRTStartup) specified in the users guide.  I think the default
> implementation of main() in calls WinMain(), so I wonder if the call to
> mainCRTStartup is required.  Perhaps the FAQ is out of date.
> 
> If built with "-e WinMainCRTStartup" to set the entry point,
> WinMainCRTStartup
> gets called.


Thanks very much. I'll probably update the User's Guide by putting
this example in it instead of the WinMailCRTStartup() stuff. 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-04-09 13:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-04 18:54 Bug in GUI App WinMain Arguements BB
2003-04-04 19:14 ` Martin
2003-04-04 19:32   ` BB
2003-04-04 20:01     ` Christopher Faylor
2003-04-07 21:42       ` BB
2003-04-07 23:19         ` Christopher Faylor
2003-04-04 21:18 ` Max Bowsher
2003-04-05 16:52   ` Joshua Daniel Franklin
2003-04-08 16:43     ` Bug in GUI App WinMain Arguments BB
2003-04-09 15:59       ` Joshua Daniel Franklin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).