impure_ptr undefined again (-mno-cygwin)

Maxim Sobolev
Tue Apr 18 03:10:00 GMT 2000


I've just downloaded and installed brand new Cygwin toolkit using new
"setup.exe" method and found that we again ran into problem with messed Cygwin
and Mingw headers. My previously installed version did not exibit this
misbehaviour. When I'm trying to compile any program which using stderr I have:

----------- tst.c-------------
#include <stdio.h>

int main()
 fprintf(stderr, "this is a test\n");
----------- tst.c-------------

bash-2.03$ gcc -mno-cygwin tst.c -o tst
C:\TEMP/cc4N5Qh5.o(.text+0x24):tst.c: undefined reference to `_impure_ptr'
collect2: ld returned 1 exit status

Following is output of gcc -v and mount:

bash-2.03$ gcc -v -mno-cygwin tst.c -o tst
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/cpp.exe -lang-c -v -D__GNUC__=2
_MINOR__=95 -Di386 -D_WIN32 -DWINNT -D_X86_=1 -D__STDC__=1
te__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__))
bute__((x)) -D__i386__ -D_WIN32 -D__WINNT__ -D_X86_=1 -D__STDC__=1
_attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__))
=__attribute__((x)) -D__i386 -D__WINNT -Asystem(winnt) -Acpu(i386)
6) -remap -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686
mpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -iwithprefixbefore
./../../i686-pc-cygwin/include/mingw32 -D__MINGW32__=0.2 tst.c
GNU CPP version 2.95.2 19991024 (release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/cc1.exe C:\TEMP/ccCdocEd.i -quiet
ase tst.c -mno-cygwin -version -o C:\TEMP/ccF50KUA.s
GNU C version 2.95.2 19991024 (release) (i686-pc-cygwin) compiled by GNU C
on 2.95.2 19991024 (release).
 C:\TEMP/cc4KjlO6.o C:\TEMP/ccF50KUA.s
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/collect2.exe -o tst.exe
pc-cygwin/lib -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../..
.o -lgcc -lmingw32 -lmoldname -lcrtdll -luser32 -lkernel32 -ladvapi32 -lshell32

C:\TEMP/cc4KjlO6.o(.text+0x24):tst.c: undefined reference to `_impure_ptr'
collect2: ld returned 1 exit status

bash-2.03$ mount
Device              Directory           Type         Flags
c:\Cygnus\cygwin-b20\H-i586-cygwin32\bin  /usr/bin            user
c:\Cygnus\cygwin-b20\H-i586-cygwin32\lib  /usr/lib            user
c:\Cygnus\cygwin-b20\H-i586-cygwin32  /                   user         binmode
c:\temp             /tmp                user         textmode

P.S. Please CC'ing replies to my e-mail since I doesn't subscribed to the list.

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list