Ik probeer een voorbeeldprogramma uit de o-reily boeken te compileren maar dat geen een fout executable.
Pag 98 uit boek Vol 6-a :
/* main_list.c -- Use the ScrolledList window as the feature
* component of a MainWindow widget.
*/
#include <Xm/MainW.h>
#include <Xm/List.h>
main(int argc, char* argv[])
{
Widget top, main_w, list_w;
XtAppContext app;
Pixmap pixmap;
XtSetLanguageProc (NULL, NULL, NULL);
top = XtVaAppInitialize (&app, "Demo", NULL, 0, &argc, argv, NULL, NULL);
main_w = XtVaCreateManagedWidget ("main_window", xmMainWindowWidgetClass, top, NULL );
list_w = XmCreateScrolledList (main_w, "main_list", NULL, 0);
XtVaSetValues (list_w, XtVaTypedArg, XmNitems, XmRString,
"Red, Green, Blue, Orange, Maroon, Grey, Black, White", 53,
XmNitemCount, 8,
XmNvisibleItemCount, 5,
NULL);
XtManageChild (list_w);
/* set the list_w as the "work area" of the main window */
XtVaSetValues (main_w, XmNworkWindow, XtParent (list_w), NULL);
XtRealizeWidget (top);
XtAppMainLoop (app);
}
dat compiled met :
gcc ${NAME}.c -o ${NAME} -I /usr/include/X11 -I /usr/include/Xm -L /usr/lib/X11 -L /usr/include/Xm -lX11 -lXt -lXm
geeft deze fout:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 19 (X_DeleteProperty)
Resource id in failed request: 0x0
Serial number of failed request: 86
Current serial number in output stream: 90
Na wat zoekwerk op het net vind ik een paar suggesties,maar geen is de oplossing.
Ik werk op Linux mint-17 64 bit.
Inmiddels ben ik uit mijn ideen en denk dat ik een behoorlijke blinde vlek heb...
Op de 32 bits ubuntu heb ik dit al eerder gedaan, en probeer mijn kennis weer wat op te frissen maar loop nu behoorlijk vast ? Heel vreemd.
Iemand een ideetje ?