Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: XtAppCreateShell. What am I doing wrong? Message-ID: <8905261439.AA14521@expo.lcs.mit.edu> Date: 26 May 89 14:39:36 GMT References: <6979@bunny.GTE.COM> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 22 > Could someone perhaps tell me what I am doing wrong? > I keep getting an > X Toolkit Error: Cannot perform malloc The error message doesn't really tell you anything, I agree. 1) You don't need to include X11/Xlib.h, but you must include X11/Shell.h 2) In the call to XtAppCreateShell, the widget class parameter should not be quoted. (Maybe you tried quoting it after you got an error because Shell.h was not included; it is defined in Shell.h) Generally, for every class of widget that you instantiate, there is a required include file. These first two caused the error message. Finally, to get it flying: 3) Replace XtMainLoop() with XtAppMainLoop(MyApplicationContext) Donna Converse MIT X Consortium