Subject: RE: impure ptr
From: [email-masked] (Bernard Dautrevaux)

12 Jan 1999 06:51:39 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
To: "'John Mamer'" <[email-masked]>, [email-masked]

> -----Message d'origine-----
> De:	John Mamer [SMTP:[email-masked]]
> Date:	Sunday, January 10, 1999 23:37
> À:	[email-masked]
> Objet:	impure ptr
> 
> Hi there!
>   I am trying to compile a program to work with the win32
> api only (not through the cygwin layer).  I read the FAQ and
> scanned the archives.  The advice seems to be to hand the
> -mno-cygwin to gcc.  Here's my problem:
> 
> I type: gcc myprog.cpp -mno-cygwin 
> 
> It compiles and tries to link but the linker comes up with
> multiple errors of the form:
> 
> C:\TEMP\cckpwiFV.o(.text+0x2bb):myprog.cc: undefined
> reference to '_impure_ptr'
> 
> I used to get this kind of error when I inadvertantly tried
> to link cygwin produced object files with mingw32.  I'm
> guessing that something similar is happening here.   I read
> the FAQ, but all I was able to uncover was the advice to use
> the -mno-cygwin as a gcc flag. I tried running gcc with -v
> and got a lot of output, some of which seemed to indicate
> that the linker was looking at the cygwin libs (which I
> thougth it wasn't supposed to do with the -mno-cygwin flag).  
> 
A lot of people also think that -mno-cygwin will select the right
libraries, but they are all wrong :-<. -mno-cygwin only change
predefined macros passed to your program and select the right header
files, but you have to retrieve the mingw32 libraries from Mumit's site
and select them manually

> Any help that anyone can give here would be greatly
> appreciated.  I shall continue to read through the mail
> archives in the mean time. 
> 
So I think you ran in one of the numerous threads on this point... :-)

> thank you.
> 
You're welcome,

		Bernard

PS: CygWin maintainers: you do a great job by providing CygWin to all of
us that suffer on Windows, but could you pleas commit to try to
integrate mingw32 libraries in the next release (and if possible
MSVCRT.dll support as well). This will save a big deal of suffering for
quite a lot of users it seems, and could be done by providing the libs
and some simple editing of the specs file (and perhaps a small change in
gcc). I can propose a small patch if one bother to integrate it but you
still need to provide the libs...

------------------------------------------------------------------------
------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	[email-masked]
	[email-masked]
------------------------------------------------------------------------
------

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".