delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/14/13:16:22

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
Delivered-To: mailing list cygwin AT cygwin DOT com
From: norm AT dad DOT org
Message-Id: <200201141814.KAA21325@dad.dad.org>
To: cygwin AT cygwin DOT com
cc: "Steven C. Bankes" <steve AT virgil DOT evolvinglogic DOT com>,
"Steven C. Bankes" <stevebankes AT yahoo DOT com>,
"Nathaniel Anagnostou" <nateana AT pacbell DOT net>
cc: norm AT dad DOT org
Reply-To: norm AT dad DOT org
Subject: Need help Accessing a NAN
Date: Mon, 14 Jan 2002 10:14:14 -0800

Under Linux I do:

  include <math.h>
  ...
  reciprocal=NAN;
 

When I try to compile this under cygwin, gcc complains that NAN is undefined.

Under cygwin, "man nan", tells me about a function named nan(), also using math.h.
When I try to use it, gcc complains about an implicit declaration of nan().

I am attaching relevant portions of the Makefile I am using to the end of this
message.

Help would be appreciated.

    Norman Shapiro
    798 Barron Avenue
    Palo Alto CA 94306-3109
    (650) 565-8215
    norm AT dad DOT org

libDir=../Run
jdk=/cygdrive/c/jdk1.3.1_01/

all:									\
	$(libDir)/sine.dll           					\
	$(libDir)/regret.dll 						\
	$(libDir)/quad.dll           					\
	$(libDir)/arith.dll          					\
	$(libDir)/fast.dll          					\
	$(libDir)/slow.dll          					\

GDBFLAGS = -g -ggdb
CPPFLAGS= -m486  -Wall -Wpointer-arith  -pipe	 		       	\
	-I/usr/X11R6/include						\
	-g 								\
	-O								\
	-Wbad-function-cast                                             \
	-Wstrict-prototypes                                             \
	-Wmissing-prototypes                                            \
	-Wmissing-declarations                                          \
	-Werror                                                         \
	-D_ISOC9X_SOURCE        				        \
	-Wnested-externs                                                \
	-I $(jdk)/include	                                     	\
        -I $(jdk)/include/linux                               		\
	-I $(jdk)/include/genunix                                  	\
	-I /usr/include/g++-3						\
	 $(GDBFLAGS)                                 	                \
	
	
$(libDir)/%.dll: %.cpp Makefile
	gcc					\
	$(CPPFLAGS)				\
	-mno-cygwin				\
	-I$(jdk)/include			\
	-I$(jdk)/include/win32			\
	-Wl,--add-stdcall-alias			\
	-shared					\
	-o\
	$@ $<

--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019