Mail Archives: cygwin/2001/07/19/10:23:36
At 05:29 AM 7/19/2001, Steve Lhomme wrote:
>I'm using Cygwin to compile some MinGW32 stuff. And I have some assert() calls
>in my code. But if I understand correctly when I use the -mno-cygwin --
>target=i386-mingw32 option I get the follwing include path :
>
>GNU CPP version 2.95.3-4 (cygwin special) (80386, BSD syntax)
>#include "..." search starts here:
>#include <...> search starts here:
> .
> /usr/include/g++-3
> /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/include
> /usr/include
> /usr/include/w32api
>End of search list.
>The following default directories have been omitted from the search path:
>End of omitted list.
>
>The problem is that there is an assert.h in /usr/include and one
>in /usr/include/w32api
>The one from /usr/include has something like #define assert(x) __assert(...
>The one from /usr/include/w32api has something like #define assert(x) _assert
>(...
>
>And on the link, I get the following error :
>AEncodeProperties.o: In function `AEncodeProperties::GetChannelModeString(int)
>const':
>/cygdrive/e/users/slhomme/lame/out_lame/AEncodeProperties.cpp:332: undefined
>reference to `__assert'
>
>I think it should look for _assert and not __assert.
>So how can I deal with that ???
First, figure out which assert you want, the one from /usr/include
or the one from /usr/include/w32api. Then, figure out which library
has the assert definition that does with the macro you chose. If
the library is not libcygwin.a, include it in your link line.
Presto, you're done! :-)
BTW, this doesn't appear to be a Cygwin specific problem per-se.
Larry Hall lhall AT rfk DOT com
RFK Partners, Inc. http://www.rfk.com
118 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
(508) 560-1285 - cell phone
--
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/
- Raw text -