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