home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / apollo / 3067 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.5 KB  |  40 lines

  1. Newsgroups: comp.sys.apollo
  2. Path: sparky!uunet!sun-barr!ames!think.com!paperboy.osf.org!paperboy!drand
  3. From: drand@spinner.osf.org (Douglas Rand)
  4. Subject: Re: C++ V2.1.0 versus OSF/Motif ANSI/NON-ANSI. Help needed
  5. In-Reply-To: pfander@kommu.UUCP's message of 21 Jul 92 10:01:15 GMT
  6. Message-ID: <DRAND.92Jul21135935@spinner.osf.org>
  7. Followup-To: comp.sys.apollo
  8. Sender: news@osf.org (USENET News System)
  9. Organization: Open Software Foundation
  10. References: <510@kommu.UUCP>
  11. Date: 21 Jul 92 13:59:35
  12. Lines: 26
  13.  
  14. In article <510@kommu.UUCP> pfander@kommu.UUCP (Dr Gotthard Pfander) writes:
  15.  
  16.    C++ V2.1.0 as supplied by HP/Apollo uses ANSI-calling convention as default.
  17.  
  18.    The supplied libraries: libC.a, libOstream.a, ... all expect ANSI-calling.
  19.  
  20.    Using OSF/Motif, being NON-ANSI as supplied by HP/Apollo,
  21.    thus creates a serious compatibility-problem.
  22.  
  23.    Using C++ requires at least the library libC.a for the _main an similar things.
  24.  
  25.    Anyone got a good idea, how to solve this decently.
  26.  
  27.    Please, don't tell me things like RTFM ....
  28.  
  29. Oh.  But that's my favorite answer.  Try including the include
  30. files in a extern "C" { ... } block so you get K&R C compliance.  
  31. You might need extern "C--" for some C++ compilers.  Motif 1.1.x
  32. included ANSI prototypes,  so I'm not sure why HP would have 
  33. stripped them.  I'm presuming you're not using Motif 1.0.
  34.  
  35. --
  36. Douglas S. Rand <drand@osf.org>        OSF/Motif Dev.
  37. Snail:         11 Cambridge Center,  Cambridge,  MA  02142
  38. Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
  39. Amateur Radio: KC1KJ
  40.