Results 1 to 2 of 2
Sorry if this is a repeat - I tried posting this earlier but it hasn't appeared.
I'm getting an error message that others have gotten based on a Google search, ...
- 03-23-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 2
Motif runtime error
Sorry if this is a repeat - I tried posting this earlier but it hasn't appeared.
I'm getting an error message that others have gotten based on a Google search, but there were no suggestions posted. It appears to occur with all Motif wigets, but straight xlib and Xaw functions work fine. Here is the error message and associated background information. Any advise is welcome.
> rpm -qa | grep redhat-release
redhat-release-4WS-9
> gcc -o xm_hello xm_hello.c -lX11 -lXt -lXm
> xm_hello
Error: No realize class procedure defined
> cat xm_hello.c
#include <stdio.h>
#include <X11/Intrinsic.h> /* Intrinsics Definitions*/
#include <X11/StringDefs.h> /* Standard Name-String definitions*/
#include <Xm/PushB.h>
int main(int argc, char *argv[])
{
Widget toplevel, button;
XtAppContext app;
void button_pushed();
XmString label;
XtSetLanguageProc (NULL, NULL, NULL);
toplevel = XtVaAppInitialize (&app, "Hello", NULL, 0, &argc, argv, NULL, NULL);
label = XmStringCreateLocalized ("Push here to say hello");
/*** the following throws the error 'No realize class procedure defined' */
button = XtVaCreateManagedWidget ("pushme",
xmPushButtonWidgetClass, toplevel, XmNlabelString, label, NULL);
XmStringFree (label);
XtAddCallback (button, XmNactivateCallback, button_pushed, NULL);
XtRealizeWidget (toplevel);
XtAppMainLoop (app);
}
void button_pushed(Widget widget, XtPointer client_data, XtPointer call_data)
{
printf ("Hello Yourself!\n");
}
- 03-24-2010 #2Just Joined!
- Join Date
- Mar 2010
- Posts
- 2
In case it helps, here is some info about the libs:
> ls -l libXm.*
lrwxrwxrwx 1 root root 14 Mar 23 15:14 libXm.so -> libXm.so.3.0.2
lrwxrwxrwx 1 root root 14 Feb 11 16:56 libXm.so.3 -> libXm.so.3.0.2
-rwxr-xr-x 1 root root 2718784 Jan 23 2009 libXm.so.3.0.2
> ldd libXm.so.3.0.2
libXmu.so.6 => /usr/X11R6/lib64/libXmu.so.6 (0x00000030c0d00000)
libXt.so.6 => /usr/X11R6/lib64/libXt.so.6 (0x00000030c2200000)
libSM.so.6 => /usr/X11R6/lib64/libSM.so.6 (0x00000030be700000)
libICE.so.6 => /usr/X11R6/lib64/libICE.so.6 (0x00000030be900000)
libXext.so.6 => /usr/X11R6/lib64/libXext.so.6 (0x00000030be100000)
libXp.so.6 => /usr/X11R6/lib64/libXp.so.6 (0x00000030bed00000)
libX11.so.6 => /usr/X11R6/lib64/libX11.so.6 (0x00000030bd800000)
libc.so.6 => /lib64/tls/libc.so.6 (0x00000030bda00000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000030bdf00000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)


Reply With Quote