Bug 74502 - Missing XmStrDefsI.h header file
Summary: Missing XmStrDefsI.h header file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openmotif
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-25 14:27 UTC by Wayne Price
Modified: 2007-04-18 16:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-19 15:29:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Wayne Price 2002-09-25 14:27:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Description of problem:
The header file XmStrDefsI.h appears to be missing, and it is not possible to
use the XmExt18List widget.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Try to compile the following sample code:

// Compile with
//   gcc -I/usr/X11R6/include -L/usr/X11R6/lib ext18list.c -lXm -lXt -lX11 -o
ext18list

#include <stdio.h>
#include <Xm/Xm.h>
#include <Xm/Ext18List.h>
#include <Xm/Form.h>
 

// Program main...

int main(int argc, char *argv[])
{
    XtAppContext appContext;

    // Initialise X Intrinsics, and create an application comtext and top
    // level widget.

    Widget topLevel = XtVaAppInitialize(&appContext, "RenderTest", 
                                        NULL, 0, &argc, argv, NULL, NULL);
 
    // Create the main window.

    Widget mainWindow = XtVaCreateManagedWidget("mainWindow",
                                        xmFormWidgetClass, topLevel,
                                        NULL);

    // Create the list

    Widget list = XtVaCreateManagedWidget("list", xmExt18ListWidgetClass,
                                        mainWindow,
                                        XmNtopAttachment, XmATTACH_FORM, 
                                        XmNtopOffset, 10, 
                                        XmNbottomAttachment, XmATTACH_FORM, 
                                        XmNbottomOffset, 10, 
                                        XmNleftAttachment, XmATTACH_FORM, 
                                        XmNleftOffset, 10, 
                                        XmNrightAttachment, XmATTACH_FORM, 
                                        XmNrightOffset, 10, 
                                        NULL);

    // Realise the top level widget and enter the event loop.

    XtRealizeWidget(topLevel);

    XtAppMainLoop(appContext);
}
 


Actual Results:  In file included from /usr/X11R6/include/Xm/Ext18List.h:17,
                 from ext18list.c:6:
/usr/X11R6/include/Xm/Ext.h:19:27: Xm/XmStrDefsI.h: No such file or directory


Expected Results:  Should have built an executable program.

Additional info:

Comment 1 Ngo Than 2002-10-05 11:14:10 UTC
it's perhaps a bug in Ext.h which should include XmStrDefs.h instead XmStrDefsI.h.
or perhaps just rename XmStrDefsI.h to XmStrDef.h. It should also work.

I will take contakt to openmotif developer to ask which of both is correct fix.

Comment 2 Wayne Price 2002-10-06 19:41:16 UTC
I think the file should actually exist. There are #defines in that file (e.g.
XmNfirstRow, XmNfirstColumn) which are used by the Ext18List, and without having
access to these from the application, these symbols won't be available.

Comment 3 Ngo Than 2002-11-06 14:56:21 UTC
ok, XmStrDefsI.h should be removed from Ext.h. It's fixed in 2.2.2-13. You will
find it in rawhide.

Comment 4 Wayne Price 2002-11-06 15:34:27 UTC
I think you might not have fixed it. The rpms aren't in rawhide yet, but try the
following code instead. It refers to the additional symbols which are needed in
various situations. This was alluded to in my comment of 6 October.

// Compile with
//   gcc -I/usr/X11R6/include -L/usr/X11R6/lib ext18list.c -lXm -lXt -lX11 -o
ext18list

#include <stdio.h>
#include <Xm/Xm.h>
#include <Xm/Ext18List.h>
#include <Xm/Form.h>
 

// Program main...

int main(int argc, char *argv[])
{
    XtAppContext appContext;

    // Initialise X Intrinsics, and create an application comtext and top
    // level widget.

    Widget topLevel = XtVaAppInitialize(&appContext, "RenderTest", 
                                        NULL, 0, &argc, argv, NULL, NULL);
 
    // Create the main window.

    Widget mainWindow = XtVaCreateManagedWidget("mainWindow",
                                        xmFormWidgetClass, topLevel,
                                        NULL);

    // Create the list

    XmString t1 = XmStringCreateLocalized("Column 1");
    XmString t2 = XmStringCreateLocalized("Column 2");
    XmString t3 = XmStringCreateLocalized("Column 3");
    XmString columnTitles[] = { t1, t2, t3 };

    XmString mainTitle = XmStringCreateLocalized("Main List Title");

    Widget list = XtVaCreateManagedWidget("list", xmExt18ListWidgetClass,
                                        mainWindow,
                                        XmNnumColumns, 3,
                                        XmNcolumnTitles, columnTitles,
                                        XmNtitle, mainTitle,
                                        XmNtopAttachment, XmATTACH_FORM, 
                                        XmNtopOffset, 10, 
                                        XmNbottomAttachment, XmATTACH_FORM, 
                                        XmNbottomOffset, 10, 
                                        XmNleftAttachment, XmATTACH_FORM, 
                                        XmNleftOffset, 10, 
                                        XmNrightAttachment, XmATTACH_FORM, 
                                        XmNrightOffset, 10, 
                                        NULL);



    // Realise the top level widget and enter the event loop.

    XtRealizeWidget(topLevel);

    XtAppMainLoop(appContext);
}


I look forward to testing this myself...

Comment 5 Wayne Price 2002-11-12 12:49:34 UTC
Still can't test that it's been fixed correctly. It's still not in rawhide
(looked in ftp://ftp.redhat.com/pub/redhat/linux/rawhide/i386/RedHat/RPMS/).

Comment 6 Thomas Woerner 2003-01-21 16:20:31 UTC
Fixed in rawhide in rpm openmotif-2.2.2-13 or newer.

Comment 7 Wayne Price 2003-01-21 17:02:28 UTC
When and where can I find this package for testing? It's been fixed in
openmotif-2.2.2-13 since 6 November 2002, but I have yet to see it in rawhide. I
am looking here -
ftp://ftp.redhat.com/pub/redhat/linux/rawhide/i386/RedHat/RPMS/ - and there's
only openmotif-2.2.2.12

Comment 8 Wayne Price 2003-01-27 09:36:07 UTC
Not fixed. Using the second example, from 6 November, I get the following error:

ext18list.c:41: `XmNcolumnTitles' undeclared (first use in this function)
ext18list.c:41: (Each undeclared identifier is reported only once
ext18list.c:41: for each function it appears in.)

As I commented earlier, you've chosen the wrong fix.


Comment 9 Wayne Price 2003-10-30 10:27:09 UTC
See here for how to fix.
  http://bugs.motifzone.net/show_bug.cgi?id=1234

Comment 10 Thomas Woerner 2004-04-19 15:29:52 UTC
Fixed in rawhide in rpm openmotif-2.2.3-2 or newer.


Note You need to log in before you can comment on or make changes to this bug.