home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13273 < prev    next >
Encoding:
Text File  |  1992-09-03  |  1.7 KB  |  42 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!mcsun!sun4nl!alchemy!prisma!rvloon
  3. From: rvloon@cv.ruu.nl (Ronald van Loon)
  4. Subject: Re: X programs in C++, why do they need -DFUNCPROTO ?
  5. Originator: rvloon@triton.cv.ruu.nl
  6. Sender: usenet@cv.ruu.nl (Usenet Network)
  7. Message-ID: <1992Sep4.073425.12442@cv.ruu.nl>
  8. Date: Fri, 4 Sep 1992 07:34:25 GMT
  9. References: <2921@contex.contex.com>
  10. Nntp-Posting-Host: triton.cv.ruu.nl
  11. Organization: University of Utrecht, 3D Computer Vision Research Group
  12. Lines: 28
  13.  
  14. In <2921@contex.contex.com> avinash@felix.contex.com (Avinash Chopde) writes:
  15.  
  16. |"I had to provide a -DFUNCPROTO option to the C++ compiler (2.11 and 3.10)
  17. |"to compile a X program.
  18. |"Without -DFUNCPROTO, the prototypes for XtInitialize(..), etc are not
  19. |"included.
  20. |"
  21. |"Now, is this normal behavior, or is there some other procedure
  22. |"to compile C++ X programs ?
  23. |"Thanks for any help....
  24.  
  25. FUNCPROTO is a symbol that when defined will force the prototypes to be used.
  26.  
  27. Or, more correctly, that will cause the symbol NeedFunctionPrototypes to be
  28. set to a value greater than zero. Normally this symbol, when not defined
  29. manually, will be defined when either __STDC__, __cplusplus, c_plusplus, or
  30. FUNCPROTO are defined. FUNCPROTO may be a special case in X11R5, it not only
  31. needs to be defined, it also needs to be defined to a value > 0 for prototypes
  32. to be used. 
  33.  
  34. In short, if you want to be sure that Prototypes are used, then define
  35. NeedFunctionPrototypes to '1'. This should work on all systems, while
  36. FUNCPROTO might not (other systems use XTFUNCPROTO, for example).
  37. -- 
  38. Ronald van Loon (rvloon@cv.ruu.nl) 3DCV Group, Utrecht, The Netherlands.
  39.  
  40. "I believe the word you are looking for is "AAAAAAAAAARRRRRRRRRRGGGGGHHHH!"
  41.     - The Penguin (Batman ][)
  42.