home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!rutgers!cmcl2!mcclb0.med.nyu.edu!siegel
- From: siegel@mcclb0.med.nyu.edu
- Newsgroups: comp.sys.sgi
- Subject: HELP! What's wrong with this code?...
- Message-ID: <1992Jul27.102418.1@mcclb0.med.nyu.edu>
- Date: 27 Jul 92 15:24:18 GMT
- Sender: notes@cmcl2.nyu.edu (Notes Person)
- Organization: NYU Medical Center, New York, NY 10016, USA
- Lines: 54
- Nntp-Posting-Host: mcclb0.med.nyu.edu
-
- I can't seem to get the following code to work. I gives a Segmentation
- Fault on the last line:
-
- /*********************** CODE BEGINS HERE *********************/
-
- /* Compile with: cc smalltest.c -lXm -lXt -lX11 -o smalltest
- */
-
- #include <stdio.h>
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- #include <Xm.Xm.h>
- #include <Xm/Form.h>
- #include <X11/Xirisw/GlxMDraw.h>
- #include <X11/Xirisw/GlxDraw.h>
- #include <X11/keysym.h>
- #include <gl/gl.h>
- #include <gl/device.h>
- #include <math.h>
-
- static XtAppContext app_context;
-
- static XrmOptionDescRec SGIoptions =
- {"-display", "*display", XrmoptionNoArg, "mchip02:0.0"};
- static Cardinal num_options = 1;
-
- Widget SGItoplevel, MACtoplevel;
-
- Display *MACdisplay;
-
- main(int argc, char **argv)
- {
- SGItoplevel = XtAppInitialize
- (
- &app_context,
- "GLcanvas",
- &SGIoptions,
- num_options,
- &argc, argv,
- NULL, /* instead of fallback_resources */
- NULL,
- 0
- );
-
- MACdisplay = XtOpenDisplay(&app_context, "Display_Canvas",
- "glcanvas", "GLcanvas", NULL, 0, &argc, argv);
- MACtoplevel = XtAppCreateShell("glcanvas", "GLcanvas",
- topLevelShellWidgetClass, MACdisplay, NULL, 0);
- }
-
- I appreciate any help anyone can give. Please reply via email:
- siegel@med.nyu.edu
- Chris Siegel
- NYU School of Medicine
-