From: phepworth@s-vision.com (Paul Hepworth)
Subject: RE: assert.h and undefined assert() in ld
20 Mar 1998 23:21:30 -0800
Message-ID: <00D7B108BAFFD011B66D00A0C903629C17403F.cygnus.gnu-win32@el-postino.s-vision.com>
Mime-Version: 1.0
Content-Type: text/plain
To: "'raf@comdyn.com.au'" <raf@comdyn.com.au>, gnu-win32@cygnus.com

> >What's the trick to getting assert to work?  Compiles fine, linker bails
> >with undefined reference to assert().  What flag do I need to include the
> >assert.
> >(FWIW, I don't need to do anything special to make assert work under gcc
> for
> >Solaris)
> 
> just guessing:
> 
> 	#include <assert.h>
> 
Very funny.

> if you already are doing this, look at assert.h to see what the
> problem is. try gcc -E to see what's coming out of cpp, ...
> 
Been there, done that.  Assert.h (and gcc -E) generate calls to __assert(),
which the linker can't find.  (Meaning it isn't in the crt, I imagine.)


Paul

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
