| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Fri, 22 Nov 2002 20:34:27 -0500 |
| From: | Christopher Faylor <cgf AT redhat DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: impure_ptr/Mingw and cygwin |
| Message-ID: | <20021123013427.GA14697@redhat.com> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <3DDED511 DOT 7 AT Salira DOT com> |
| Mime-Version: | 1.0 |
| In-Reply-To: | <3DDED511.7@Salira.com> |
| User-Agent: | Mutt/1.5.1i |
On Fri, Nov 22, 2002 at 05:08:33PM -0800, Andrew DeFaria wrote:
>I wish to use -mno-cygwin to produce an executable that can work without
>Cygwin installed. I have successfully done this before. Now I'm adding
>some functionality to my program and it is no longer working! I've
>worked it out such that it will compile and link but when my program
>runs it simply stops returning an exit code of 5. Running this under gdb
>produces a SIGSIGV Segmentation fault then you attempt to run it.
>
>I've whittled it down to the bare minimum to reproduce the problem.
>Seems to me the problem is somewhere between newer versions of gcc 3.X
>and Mingw.
>
>File: foo.c:
>
>#include <stdio.h>
>int main (void) {
> printf ("Hello World\n");
> fprintf (stderr, "%s\n", "Hello World 2");
>}
>
>$ gcc -g foo.c -mno-cygwin -I/usr/include -o foo -liberty -lcrtdll -lg
>$ foo
>$
>
>Note that if I do not put -lg then I get:
>
>/tmp/ccKAyr4S.o(.text+0x4b): In function `main':
>/dview/defaria_2.0/salira/neopon/build/maketools/foo.c:4: undefined
>reference to `_impure_ptr'
>
>Any ideas?
Undoubtedly neither -liberty nor -lg are compiled using -mno-cygwin.
cgf
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |