Xref: news2.mv.net comp.os.msdos.djgpp:8371 From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: version 2 problem Date: Fri, 06 Sep 1996 18:42:13 -0700 Organization: Three pounds of chaos and a pinch of salt Lines: 60 Message-ID: <3230D2F5.A0A@cs.com> References: <199609061304 DOT NAA12912 AT hassrvares DOT er DOT usgs DOT gov> NNTP-Posting-Host: ppp203.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "<\"R. Steven Regan, Hydrologist, Reston, VA \"" DJ-Gateway: from newsgroup comp.os.msdos.djgpp <"R. Steven Regan, Hydrologist, Reston, VA " wrote: > > Hello again, I noticed there were two copies of math.h (one in include and the > other in include/libm). I mv'd the one in libm into include and recompiled and > was able to get the program working. However, the results of the model are > different under version 2 than under version 1 for some of the test cases. This > is very disturbing. Also, I get a message "Extended error 183" occassionally. > By this I mean, I will run the program on one test and get the message, then > run it on another test and not get the message, then run the first test again > and not get the message OR I could run one test and not get the message then > run it again and get the message. Note, I am using a Gateway 2000 P5-120 under > Windows 95, using a DOS window to run the geochemical model. > > I noticed there are other duplicate header file names in the include directory > structure. > > file.h libc/file.h sys/file.h > pc.h inlines/pc.h > dir.h sys/dir.h > errno.h sys/errno.h > time.h sys/time.h > > Apparently, the correct math.h was not getting included, so I am wondering if > the correct versions of other header files are getting included. I assume > I should put back the original math.h, but how do I make sure the math.h in > libm is used? I believe the duplicate headers are a result of compatibility issues between DJGPP and other compilers. DJGPP was designed to compile code from as many different compilers as possible, so I would guess that the multiple headers are for compatibility with compilers which have conflicting versions. As far as how to include one of the alternate headers, simply do something like this: #include Directory separators are fine in #include directives. There have been some problems using the original libm.a from djgpp v2, namely occasional accuracy errors and inexplicable crashes. Bug fixes have been made and will be published in the next version of djgpp; meanwhile your best bet is to either compile with the standard math functions (i.e., don't link libm), or download a patched version from: ftp://ftp.lstm.ruhr-uni-bochum.de/pub/djgpp/libm.zip There is another ftp site that also has the same file. Alternatively, I could email you the uuencoded zipfile. Hope this helps! John -- Anything that happens, happens. Anything that, in happening, causes something else to happen, causes something else to happen. Anything that, in happening, causes itself to happen again, happens again. It doesn't necessarily do it in chronological order, though. --- Douglas Adams