glwDrawingAreaWidgetClass
Chris Carlson
cwcarlsonc@cox.net
Mon Oct 13 01:50:00 GMT 2014
I apologize for being so vague.
I have a fairly large program that I developed on Fedora Linux. It uses
glwDrawingAreaClassRec to create a GL window. I attempted to compile
and run it on Cygwin, and I got the failure.
I added a print statement just before calling XtCreateManagedWidget()
and discovered the value was 0 on Cygwin and an address on Linux. I
presumed that meant there was an issue.
To get around the problem, I downloaded the source from Mesa and
compiled it myself. The .a that was generated identifies the following
(using nm):
0000000000000640 D glwDrawingAreaClassRec
0000000000000728 D glwDrawingAreaWidgetClass
I then compared it to /lib/libGLw.dll.a and got this:
nm /lib/libGLw.dll.a | grep DrawingAreaClass
0000000000000000 I __imp_glwMDrawingAreaClassRec
0000000000000000 I __nm_glwMDrawingAreaClassRec
0000000000000000 I __imp_glwDrawingAreaClassRec
0000000000000000 I __nm_glwDrawingAreaClassRec
Now I tried compiling your test program and found that it did work as
you showed, but I then added the include of GLwDrawA.h, and it fails.
This doesn't make a whole lot of sense to me, and it doesn't seem right.
What do you think? If I want to use the GLwDrawingAreaWidgetClass, I
would presume that I should include the corresponding header file and
the class would be defined.
Thanks for your time, and I really do appreciate you and Cygwin.
Chris Carlson
On 10/7/2014 6:50 AM, Jon TURNEY wrote:
> On 07/10/2014 03:31, Chris Carlson wrote:
>> I've discovered that the constant glwDrawingAreaWidgetClass is set to
>> 0. It's supposed to be defined as:
>>
>> WidgetClass
>> glwDrawingAreaWidgetClass=(WidgetClass)&glwDrawingAreaClassRec;
>
> Can I ask you to please provide some more details as to how you made
> this discovery?
>
> If you do this:
>
> $ cat glw-test.c
> #include <Xm/Xm.h>
> #include <GL/GLwDrawA.h>
> #include <stdio.h>
>
> int main()
> {
> printf("glwDrawingAreaWidgetClass %p", glwDrawingAreaWidgetClass);
> }
>
> then you could reach that conclusion:
>
> $ gcc glw-test.c ; ./a
> glwDrawingAreaWidgetClass 0x0
>
> but this isn't testing correctly as glwDrawingAreaWidgetClass isn't
> marked as extern in GLwDrawA.h
>
> $ cat glw-test.c
> #include <Xm/Xm.h>
> #include <stdio.h>
>
> extern WidgetClass glwDrawingAreaWidgetClass;
>
> int main()
> {
> printf("glwDrawingAreaWidgetClass %p", glwDrawingAreaWidgetClass);
> }
>
> $ gcc glw-test.c -lGLw ; ./a
> glwDrawingAreaWidgetClass 0x5bd8e3640
>
>> Is it broken?
>
> I don't know.
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
More information about the Cygwin-xfree
mailing list