From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13835 invoked by alias); 13 Oct 2014 01:50:38 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 3218 invoked by uid 89); 13 Oct 2014 01:48:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: fed1rmfepo201.cox.net Received: from fed1rmfepo201.cox.net (HELO fed1rmfepo201.cox.net) (68.230.241.146) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Oct 2014 01:48:23 +0000 Received: from fed1rmimpo305 ([68.230.241.173]) by fed1rmfepo201.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20141013014821.ZAJM8823.fed1rmfepo201.cox.net@fed1rmimpo305> for ; Sun, 12 Oct 2014 21:48:21 -0400 Received: from [192.168.3.3] ([68.4.148.164]) by fed1rmimpo305 with cox id 2RoL1p00S3Z39xQ01RoMCK; Sun, 12 Oct 2014 21:48:21 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=c711t2Bl c=1 sm=1 a=HzH0cq9+jSQhmUWFh+PQaQ==:17 a=BGi6d-X4uLYA:10 a=G8Uczd0VNMoA:10 a=IkcTkHD0fZMA:10 a=kviXuzpPAAAA:8 a=LuwGZjStm4794Hy0BE4A:9 a=QEXdDO2ut3YA:10 a=HzH0cq9+jSQhmUWFh+PQaQ==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (CRAM-MD5) smtp.auth=cwcarlsonc@cox.net Message-ID: <543B2F63.9030403@cox.net> Date: Mon, 13 Oct 2014 01:50:00 -0000 From: Chris Carlson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Re: glwDrawingAreaWidgetClass References: <5433509B.8050805@cox.net> <0DqF1p0240YP9AS01DqG2B> In-Reply-To: <0DqF1p0240YP9AS01DqG2B> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00031.txt.bz2 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 > #include > #include > > 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 > #include > > 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/