delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/27/19:54:42.1

From: asmith AT www DOT aeinc DOT com ("A. Phillip Smith")
Subject: Re: linking with -mwindows
27 Mar 1997 19:54:42 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199703272336.PAA22354.cygnus.gnu-win32@www.aeinc.com>
Mime-Version: 1.0
Original-To: drs AT inxpress DOT net
Original-Cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <333AF505.1921@inxpress.net> from "DRS" at Mar 27, 97 04:30:29 pm
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: owner-gnu-win32 AT cygnus DOT com

> 
> A. Phillip Smith wrote:
> 
> > I would prefer to think that the other Smith didn't try to link
> > with the -lkernel32 library. In which case, things probably did
> > work for him. If he ever is inclined to repeat the test with that
> > library, I'm sure he'll agree that this is not a figment of our
> > collective imaginations, and we can end this thread.
> > 
> > Phil Smith
> 
> Of course you are right--the problem was not a "figment of your
> imagination." But my question is, what happens when you 
> use -mwindows instead of -lkernel32, -luser32, and -lgdi32? 
> I thought -mwindows just rolled these into one script--but
> I guess not. You see, somehow I *have* been linking to the 
> functions in question (that's why my code has been working)
> and you haven't. So perhaps you might like to re-phrase 
> the above. The issue is not whether I have "tried linking" 
> to the windows libraries. I have been doing this successfully
> all along (apparently fools luck).
> 
> The issue is if *you* have tried linking using -mwindows. I 
> posted some code earlier that I believe may work with the api
> you wanted to employ. I hope you have tried it, and will verify my
> conclusion.
> 
> Best Regards,
> DRS
> 
DRS,

I don't have your earlier code. Disambiguating my posting above,
let me make it clear that I also link with the APIs in my earlier mail
and others, and they work (as they did for you) ONLY when I link *implicitly*  
to KERNEL32.LIB using options '-mwindows' OR '-Wl, --subsystem,windows', but
NOT when using the '-lkernel32' gcc OPTION on NT. The option '-lkernel32' seems
to be the only library selection that causes the problem. It occurs with
or without the presence of the ld windows library selection options.

APS

-
For help on using this list, 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