From: earnie_boyd AT yahoo DOT com (Earnie Boyd) Subject: Re: B20: undefined reference to `_impure_ptr' 13 Nov 1998 04:25:17 -0800 Message-ID: <19981112135741.11308.rocketmail.cygnus.gnu-win32@send103.yahoomail.com> Reply-To: earnie_boyd AT yahoo DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Vladimir Dubrovin , gnu-win32 AT cygnus DOT com ---Vladimir Dubrovin wrote: > > Hello Gnu-win32, > > This bug was already reported, but i didn't stated any solution... > Sorry, if i'm wrong of if it's not the bug, but result if improper > use of mingw32. The problem is following: then i'm trying to compile > simple program with -mno-cygwin switch i've got linker error: > undefined reference to `_impure_ptr' > > It seems, that this error appears only then i'm using some functions > with more then one arguments (such as fopen()), because there wasn't > problem then i compiled "Hello world!" ;) > Does someone know how to fix it? > > Simple example to test the problem: > > test.c: > > #include > > int main(void){ > FILE *fp; > char buffer[256]; > > fp=fopen("test.c", "r"); > if(!fp) { > fprintf(stderr, "Failed to open\n"); > return 1; > } > while ( fgets(buffer, 256, fp) )printf ("%s", buffer); > return 0; > } > > >gcc -mno-cygwin -o test test.c > D:\TEMP\ccW0yQoU.o(.text+0x4d):test.c: undefined reference to `_impure_ptr' > collect2: ld returned 1 exit status I did not have this problem. Have you seen the mail references to the changes in the specs file? == - \\||// -------------o0O0--Earnie--0O0o-------------- -- earnie_boyd AT yahoo DOT com -- -- http://www.freeyellow.com/members5/gw32 -- ----------------ooo0O--O0ooo----------------- PS: Newbie's, you should visit my page. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - 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".