Subject: RE: Cannot link ___assert, __impure_ptr with -mno-cygwin
From: "Williams, Gerald S \(Jerry\)" <[email-masked]>
To: <[email-masked]>
Cc: "Matt Olson" <[email-masked]>
Date: Tue, 29 Mar 2005 10:31:06 -0500

Matt Olson wrote:
> I've narrowed my problems down to a relatively small test case:
[...]
> Makefile:
[...]
> LINKFLAGS = -g -L/lib/mingw -mwindows -mno-cygwin
> LIBS      = -lmingw32
> 
> foo: foo.o
>         gcc $(LINKFLAGS) -o foo foo.o $(LIBS)
[...]
> Compiler output:
> $ make
> gcc -g -L. -L/home/matt/lib -L/lib/mingw -o foo foo.o -lmingw32
> -mwindows -mno-cygwin

I don't quite know how you got that makefile to produce
precisely that output. :-)

Regardless, try starting again after removing foo.o.
My guess is that you have a version of foo.o compiled
without -mno-cygwin.

If you rebuild everything, it should compile cleanly,
although I expect it will still not act the way you
want it to. If you run it from the console you won't
see any output. Try removing the -mwindows option.

I don't think you need the -L/lib/mingw or -lmingw32
options either, although they shouldn't hurt.

-Jerry

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/