From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18211 invoked by alias); 14 Oct 2014 19:37:52 -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 18201 invoked by uid 89); 14 Oct 2014 19:37:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: out4-smtp.messagingengine.com Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 14 Oct 2014 19:37:51 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by gateway2.nyi.internal (Postfix) with ESMTP id 8B0D52041D for ; Tue, 14 Oct 2014 15:37:49 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 14 Oct 2014 15:37:49 -0400 Received: from [192.168.1.102] (unknown [86.174.34.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 1D3F168011A; Tue, 14 Oct 2014 15:37:49 -0400 (EDT) Message-ID: <543D7B89.3000505@dronecode.org.uk> Date: Tue, 14 Oct 2014 19:37:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree@cygwin.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: cwcarlsonc@cox.net Subject: Re: glwDrawingAreaWidgetClass References: <5433509B.8050805@cox.net> <0DqF1p0240YP9AS01DqG2B> <543B2F63.9030403@cox.net> In-Reply-To: <543B2F63.9030403@cox.net> Content-Type: multipart/mixed; boundary="------------030901070707000308000807" X-SW-Source: 2014-10/txt/msg00040.txt.bz2 --------------030901070707000308000807 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2203 On 13/10/2014 02:48, Chris Carlson wrote: > 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 Unfortunately, this isn't telling you anything useful as the __imp import symbols are fixed up at run-time. > 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. The issue is that without the extern, the declaration of glwDrawingAreaWidgetClass is also a 'tentative definition' If there are no other references to symbols in libGLw, then that tentative definition (with a value of 0) will be used by ld as the definition. (Linking with a shared library on linux is more relaxed) > 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. On 07/10/2014 14:50, Jon TURNEY wrote: > but this isn't testing correctly as glwDrawingAreaWidgetClass isn't marked as extern in GLwDrawA.h Sorry, I should have said something like 'it's a bug that glwDrawingAreaWidgetClass isn't marked as extern in GLwDrawA.h' So, something like the following attached patch to GLwDrawA.h is needed. -- Jon TURNEY Volunteer Cygwin/X X Server maintainer --------------030901070707000308000807 Content-Type: text/plain; charset=windows-1252; name="GLwDrawA.h.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="GLwDrawA.h.patch" Content-length: 854 LS0tIEdMd0RyYXdBLmguYmFrCTIwMTQtMTAtMTMgMTM6MDA6MTguMTQwNjI1 NDAwICswMTAwCisrKyBHTHdEcmF3QS5oCTIwMTQtMTAtMTMgMTM6MDE6MDYu NTgxNzYyMzAwICswMTAwCkBAIC0xMzYsNyArMTM2LDcgQEAKIHR5cGVkZWYg c3RydWN0IF9HTHdNRHJhd2luZ0FyZWFDbGFzc1JlYwkqR0x3TURyYXdpbmdB cmVhV2lkZ2V0Q2xhc3M7CiB0eXBlZGVmIHN0cnVjdCBfR0x3TURyYXdpbmdB cmVhUmVjCSpHTHdNRHJhd2luZ0FyZWFXaWRnZXQ7CiAKLUdMQVBJIFdpZGdl dENsYXNzIGdsd01EcmF3aW5nQXJlYVdpZGdldENsYXNzOworZXh0ZXJuIEdM QVBJIFdpZGdldENsYXNzIGdsd01EcmF3aW5nQXJlYVdpZGdldENsYXNzOwog CiAKICNlbHNlCkBAIC0xNDQsNyArMTQ0LDcgQEAKIHR5cGVkZWYgc3RydWN0 IF9HTHdEcmF3aW5nQXJlYUNsYXNzUmVjCSpHTHdEcmF3aW5nQXJlYVdpZGdl dENsYXNzOwogdHlwZWRlZiBzdHJ1Y3QgX0dMd0RyYXdpbmdBcmVhUmVjCSpH THdEcmF3aW5nQXJlYVdpZGdldDsKIAotR0xBUEkgV2lkZ2V0Q2xhc3MgZ2x3 RHJhd2luZ0FyZWFXaWRnZXRDbGFzczsKK2V4dGVybiBHTEFQSSBXaWRnZXRD bGFzcyBnbHdEcmF3aW5nQXJlYVdpZGdldENsYXNzOwogCiAKICNlbmRpZgo= --------------030901070707000308000807 Content-Type: text/plain; charset=us-ascii Content-length: 223 -- 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/ --------------030901070707000308000807--