home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 9808 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.5 KB  |  46 lines

  1. Path: sparky!uunet!mcsun!sunic!isgate!krafla!jond
  2. From: jond@rhi.hi.is (Jon Danielsson)
  3. Newsgroups: comp.sys.hp
  4. Subject: CC (8.07) does not like math.h and stdlib.h together
  5. Summary: C++ programs wich include math.h and stdlib.h don't compile under 8.07
  6. Keywords: CC
  7. Message-ID: <5255@krafla.rhi.hi.is>
  8. Date: 28 Aug 92 13:58:51 GMT
  9. Sender: usenet@rhi.hi.is
  10. Lines: 34
  11.  
  12. I have c++ programs which include math.h and stdlib.h, which work
  13. fine with the header files I got with the 8.05 system.  When I got the
  14. upgrate to 8.07 I find that I cannot compile such programs because
  15. (apparently) there are inline definitions of the abs function in 
  16. both files.  Is there any way to get this to work without having to 
  17. edit the header files I got with the system?  
  18. An example of this follows:
  19.  
  20. // program x.cc
  21. #include <stdlib.h>
  22. #include <math.h>
  23. void main(void) { }
  24.  
  25. menger:/users/walras/jond[3809] > CC x.cc
  26. CC: "/usr/include/math.h", line 185: error: two definitions of abs() (1034)
  27.  
  28.  
  29. jondan 
  30. __________________________________________________________________
  31. Jon Danielsson            |    2 + 2 = 3, for suitably 
  32. Department of Economics        |    small values of 2
  33. University of Iceland        |
  34. 101 Reykjavik            |
  35. Iceland                |
  36. tel: 354 1 694572        |
  37. fax: 354 1 26806        |
  38. E-mail jond@rhi.hi.is        |
  39. __________________________________________________________________
  40.  
  41. --
  42. __________________________________________________________________
  43. Jon Danielsson            |    2 + 2 = 3, for suitably 
  44. Department of Economics        |    small values of 2
  45. University of Iceland        |
  46.