Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!rice!hsdndev!bunny!krs0 From: krs0@gte.com (Rod Stephens) Newsgroups: comp.windows.x.motif Subject: Re: illegal pointer/int combination Message-ID: <11196@bunny.GTE.COM> Date: 23 May 91 10:52:27 GMT References: <1991May22.172108.3805@news.larc.nasa.gov> Distribution: na Organization: GTE Laboratories, Waltham MA Lines: 30 In article <1991May22.172108.3805@news.larc.nasa.gov> jka@mris.larc.nasa.gov (J. Keith Alston) writes: >Greetings, > on compilation of a MOTIF program I get the following warning, > > "program.c",line 65:warning:illegal pointer/integer combination,op= > > line 65 in the program is, > menubar=XmCreateMenuBar(form,"menubar",wargs,n); > > menubar is defined as a Widget. > does anyone out there know what this error is caused by or how I can > get rid of it. I guess XmCreateMenuBar is generating an integer value > and menubar is a pointer type? Also how can I specify the width of > the menubar. specifying XmNwidth doesn't seem to work. My favorite way to generate this error is to forget to #include the header file that goes with the XmCreateWhatever function. Then C assumes the function returns an integer so it doesn't like setting = . In this case you need: #include +---------------------------------------------------------------+ | Rod Stephens | "Haven't I told you not to play | | GTE Laboratories, Inc | with my super-weapons? You might | | (617)466-4182 | devastate yourself!" | | krs0@gte.com | | +---------------------------------------------------------------+