Problems with wxBitmap::Rescale(bitmap, wxSize(x, y))

56 views
Skip to first unread message

Jouk Jansen

unread,
Oct 19, 2021, 8:12:52 AM10/19/21
to WX-...@googlegroups.com
L.S.

With the recent changes in the git-repository I got problems compiling wxGTK1.
The Error message I get is:

spawn-valeta-jj) cxx /NOLIST/OBJECT=srchctlg/define=(__WXGTK__=1,WXBUILDING=1)/f
loat=ieee/name=(as_is,short)/ieee=denorm /assume=(nostdnew,noglobal_array_new
) srchctlg.cpp/list/show=all

wxBitmap::Rescale(bitmap, wxSize(x, y));
........^
%CXX-E-MEMBERREFREQOBJ, a nonstatic member reference must be relative to a
specific object
at line number 1032 in file $DISK16:[JOUKJ.public.wxwidgets.wxwidgets_140214.wxW
idgets.src.generic]srchctlg.cpp;3

wxBitmap::Rescale(bitmap, wxSize(x, y));
........^
%CXX-E-MEMBERREFREQOBJ, a nonstatic member reference must be relative to a
specific object
at line number 1124 in file $DISK16:[JOUKJ.public.wxwidgets.wxwidgets_140214.wxW
idgets.src.generic]srchctlg.cpp;3

%CXX-I-MESSAGE, 2 errors detected in the compilation of "$DISK16:[JOUKJ.public.w
xwidgets.wxwidgets_140214.wxWidgets.src.generic]srchctlg.cpp;3".


However this message seems to be misleading because it only picks up the
nonstatic Rescale in wx/gtk1/bitmap.h (which has non-matching parameters)
and it does not see the Rescale in wxBitmapHelpers class. No idea why this
happens.


Regards
Jouk




Pax, vel iniusta, utilior est quam iustissimum bellum.
(free after Marcus Tullius Cicero (106 b.Chr.-46 b.Chr.)
Epistularum ad Atticum 7.1.4.3)


Touch not the cat bot a glove

>------------------------------------------------------------------------------<

Jouk Jansen

jo...@hrem.nano.tudelft.nl

Technische Universiteit Delft tttttttttt uu uu ddddddd
Kavli Institute of Nanoscience tttttttttt uu uu dd dd
Nationaal centrum voor HREM tt uu uu dd dd
Lorentzweg 1 tt uu uu dd dd
2628 CJ Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2782272 tt uuuuuuu ddddddd

>------------------------------------------------------------------------------<

Vadim Zeitlin

unread,
Oct 19, 2021, 9:24:04 AM10/19/21
to WX-...@googlegroups.com
On Tue, 19 Oct 2021 13:44:44 +0200 (CEST) Jouk Jansen wrote:

JJ> L.S.
JJ>
JJ> With the recent changes in the git-repository I got problems compiling wxGTK1.
JJ> The Error message I get is:
JJ>
JJ> spawn-valeta-jj) cxx /NOLIST/OBJECT=srchctlg/define=(__WXGTK__=1,WXBUILDING=1)/f
JJ> loat=ieee/name=(as_is,short)/ieee=denorm /assume=(nostdnew,noglobal_array_new
JJ> ) srchctlg.cpp/list/show=all
JJ>
JJ> wxBitmap::Rescale(bitmap, wxSize(x, y));
JJ> ........^
JJ> %CXX-E-MEMBERREFREQOBJ, a nonstatic member reference must be relative to a
JJ> specific object
JJ> at line number 1032 in file $DISK16:[JOUKJ.public.wxwidgets.wxwidgets_140214.wxW
JJ> idgets.src.generic]srchctlg.cpp;3
JJ>
JJ> wxBitmap::Rescale(bitmap, wxSize(x, y));
JJ> ........^
JJ> %CXX-E-MEMBERREFREQOBJ, a nonstatic member reference must be relative to a
JJ> specific object
JJ> at line number 1124 in file $DISK16:[JOUKJ.public.wxwidgets.wxwidgets_140214.wxW
JJ> idgets.src.generic]srchctlg.cpp;3
JJ>
JJ> %CXX-I-MESSAGE, 2 errors detected in the compilation of "$DISK16:[JOUKJ.public.w
JJ> xwidgets.wxwidgets_140214.wxWidgets.src.generic]srchctlg.cpp;3".
JJ>
JJ>
JJ> However this message seems to be misleading because it only picks up the
JJ> nonstatic Rescale in wx/gtk1/bitmap.h (which has non-matching parameters)
JJ> and it does not see the Rescale in wxBitmapHelpers class. No idea why this
JJ> happens.

Looks like a compiler bug to me. You could try redeclaring or "using" the
static function in wxGTK1 wxBitmap class, maybe guarding it with the check
for the compiler you're using.

FWIW I think I did build wxGTK1 after these changes under Linux using
gcc...

Regards,
VZ

Jouk Jansen

unread,
Oct 20, 2021, 9:40:39 AM10/20/21
to wx-...@googlegroups.com
From: SMTP%"wx-...@googlegroups.com" 19-OCT-2021 15:25:20.24
To: _JOUKJ
CC:
Subj: Re: [wx-dev] Problems with wxBitmap::Rescale(bitmap, wxSize(x, y))

:
:
Message-Id: <E1mcp62-...@smtp.tt-solutions.com>

--4294967295-41-1634649842=:11240
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Disposition: INLINE
--4294967295-41-1634649842=:11240
Content-Type: APPLICATION/PGP-SIGNATURE

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iEYEABECAAYFAmFuxvIACgkQBupB3k9sHoZ/kACfe3AMDQVWz05tl/+THD3Ixq64
3scAn0vPiG/6N14Lepl430SvW6RlMpRP
=X5Id
-----END PGP SIGNATURE-----

--4294967295-41-1634649842=:11240--
================== RFC 822 Headers ==================
Return-Path: wx-dev+bncBDOZNBUO2M...@googlegroups.com
Received: from mail-wm1-f58.google.com (209.85.128.58)
by hrem154.nano.tudelft.nl (V5.7-ECO5, OpenVMS V8.4-2L1 Alpha);
Tue, 19 Oct 2021 15:24:51 +0200 (CEST)
Received: by mail-wm1-f58.google.com with SMTP id a20-20020a1c9814000000b0032311c7fc54sf234152wme.1
for <jo...@hrem.nano.tudelft.nl>; Tue, 19 Oct 2021 06:24:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20210112;
h=sender:message-id:date:from:subject:to:mime-version:references
:in-reply-to:x-original-sender:x-original-authentication-results
:reply-to:precedence:mailing-list:list-id:list-post:list-help
:list-archive:list-subscribe:list-unsubscribe;
bh=qwOcCbFo8djlaCSdnybq48wxY90Qd1/zK42Zydr1kCE=;
b=HQAQ6xtA4YAgYvbMpXTuHnevImUUsUiVCa72uw2plPpyS6JzTuJkAdKcfy0JVIOQC9
UtVP+IfemOuKSHXZJ5x3guO6aQ7th6e/xTm1vJIaXGs7xAg55S+HEDNhQO+uOQrZDSyH
/ZwVLuYbQYxVTauIsx+dBa9iqVaU4exFr1jlSart9drIgCZF+4ijuji69v2JAlqinEun
tVHJIewo0ynlijFuxa2i6Sdgpxem/QG8tzv2qE8oUgNA6dbFq1GRRIXb/D+KPpnbG8nv
6iPoNJ9sdew7K9sNPg1kX1Ou2hSGV8fvaBqQ9ZNcVZY2bulcs2012HpBiM9w9WipFb5R
B7Tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=sender:x-gm-message-state:message-id:date:from:subject:to
:mime-version:references:in-reply-to:x-original-sender
:x-original-authentication-results:reply-to:precedence:mailing-list
:list-id:x-spam-checked-in-group:list-post:list-help:list-archive
:list-subscribe:list-unsubscribe;
bh=qwOcCbFo8djlaCSdnybq48wxY90Qd1/zK42Zydr1kCE=;
b=bx60YKgiVh3ObqZbuL7EBrE3218FwbdSg3yM+c2Y+823kbZYGK3uF5cnmGb3wnnrhe
O5jxUi+MTgHkl1TRbLLRhsc9zaDksdfq54oGBn0iz5iR2JlLrNbUQqDE0J90SeZgkaId
Up2FgpmAl6NqKPdAT3oY7HhyIN+0c7kK5Ocve1+yhva/EWH9/9FMhPav3zTLjT+alrGn
wy/hx0BPSeIo+Ro1MvkCZ2LyLIFtzcZkQ42m2vkXuE+Ol9V0CbHpRfzI3lkCc+3q0WhF
ijMcKyUapykbs/W93G2j/xseyu1yh5hgTlt3pJr9WW1eTmFVSMOi3VXuPZAmcsNZOsBa
5Ygw==
Sender: wx-...@googlegroups.com
X-Gm-Message-State: AOAM531ZC+kcALUrCNxrBt7onXfWmuJn9LLHmGvTHkJdQaC6huz5z6cF
rLWXleknhR2t+K5IFpk8q3o=
X-Google-Smtp-Source: ABdhPJxshMvL2CZzQXzFXiOCO1lFR5nH6zLPXvSWksvYNBL1roXUTLeLxGVwwT6fxoyFKOSqFM7zxw==
X-Received: by 2002:a05:600c:21c4:: with SMTP id x4mr6135727wmj.111.1634649844085;
Tue, 19 Oct 2021 06:24:04 -0700 (PDT)
X-BeenThere: wx-...@googlegroups.com
Received: by 2002:a5d:6b08:: with SMTP id v8ls1511323wrw.3.gmail; Tue, 19 Oct
2021 06:24:03 -0700 (PDT)
X-Received: by 2002:adf:b748:: with SMTP id n8mr43726161wre.133.1634649843215;
Tue, 19 Oct 2021 06:24:03 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1634649843; cv=none;
d=google.com; s=arc-20160816;
b=oLUTsi1SKQPR9FvEaiQCl1dArAWH5rxxkdLtycO1l0cvf+s/oLMm1GQuWUyJaG6AT3
mdCV7RdE3D9tiXy8ntIg8ptbowr99bqffmW5FonoMjNBebziV2xzxUXX5Ew++6yA7aIt
QXrj8FKlM/l6GJfDjaOJ8ZhuFAzWgykvkG4FZFoetHnHMiLaIFlaeeg8sS1sQhDOTWl2
qpkQSc9OlQc3ak5aYTeQk1k8N/Eb7t6Or3iWiCin3+r+C3hwmtmbZdtYlBCJWpnsuGWB
E0LUsW1GY90yezUDGPYl8x62+eUw5Wp30bv1PvYnpGTbjzSaVKcuy5JKj7PwZgO6H2UV
vUYA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=in-reply-to:references:mime-version:to:subject:from:date:message-id;
bh=qwOcCbFo8djlaCSdnybq48wxY90Qd1/zK42Zydr1kCE=;
b=PYTig/Xki16rr7XPRZLd1lXpML1VY0UyPvL5LgRVgkVX1pm9VkufFk+PCRHnevakAi
FM6koNPmiu9Fk1+wis3ezh1Ifxd7n8UUHt5IMqS3BYVTnGPNt9rU8xLu9gpoKqAP4LOK
NotBGyox6wwJICUbC+sAOYfwafJ7e+eCwHxGu7EtR5kWJePArTWWi8a9dxbx/gpmOT4C
Y4OxtbmLK4oK1qiRhHZn0Q4RRJu1Zw6NMSs2El8t7g+8dIrag4ryCuNA1pFRoiy4jmzn
ACpYsybcQaRLnghxhdMWt2xonUJxUEnQZ+IFetKtSGe8RVXxOrE0JK3dRLYxWhJypqLG
++aA==
ARC-Authentication-Results: i=1; gmr-mx.google.com;
spf=pass (google.com: domain of vz.r...@free.fr designates 212.27.42.1 as permitted sender) smtp.mailfrom=vz.r...@free.fr
Received: from smtp1-g21.free.fr (smtp1-g21.free.fr. [212.27.42.1])
by gmr-mx.google.com with ESMTPS id h11si965326wrs.3.2021.10.19.06.24.03
for <WX-...@googlegroups.com>
(version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
Tue, 19 Oct 2021 06:24:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of vz.r...@free.fr designates 212.27.42.1 as permitted sender) client-ip=212.27.42.1;
Message-ID: <616ec6f3.1c69fb81.ee665....@gmr-mx.google.com>
Received: from smtp.tt-solutions.com (unknown [82.65.146.68])
by smtp1-g21.free.fr (Postfix) with ESMTPS id 07452B00533
for <WX-...@googlegroups.com>; Tue, 19 Oct 2021 15:24:03 +0200 (CEST)
Received: from [192.168.17.86] (helo=Twilight.zeitlins.org)
by smtp.tt-solutions.com with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256)
(Exim 4.92)
(envelope-from <va...@wxwidgets.org>)
id 1mcp62-00044I-TO
for WX-...@googlegroups.com; Tue, 19 Oct 2021 15:24:02 +0200
Date: Tue, 19 Oct 2021 15:24:02 +0200
From: Vadim Zeitlin <va...@wxwidgets.org>
Subject: Re: [wx-dev] Problems with wxBitmap::Rescale(bitmap, wxSize(x, y))
To: WX-...@googlegroups.com
MIME-Version: 1.0
Content-Type: MULTIPART/SIGNED; protocol="application/pgp-signature"; micalg=pgp-sha1; BOUNDARY="4294967295-41-1634649842=:11240"
References: <21101913441...@hrem.nano.tudelft.nl>
In-Reply-To: <21101913441...@hrem.nano.tudelft.nl>
X-Mailer: Mahogany 0.68.0 'Cynthia', running under Windows 7 (build 7601, Service Pack 1), 64-bit edition
X-Original-Sender: va...@wxwidgets.org
X-Original-Authentication-Results: gmr-mx.google.com; spf=pass
(google.com: domain of vz.r...@free.fr designates 212.27.42.1 as permitted
sender) smtp.mailfrom=vz.r...@free.fr
Reply-To: wx-...@googlegroups.com
Precedence: list
Mailing-list: list wx-...@googlegroups.com; contact wx-dev...@googlegroups.com
List-ID: <wx-dev.googlegroups.com>
X-Spam-Checked-In-Group: wx-...@googlegroups.com
X-Google-Group-Id: 600217659079
List-Post: <https://groups.google.com/group/wx-dev/post>, <mailto:wx-...@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:wx-de...@googlegroups.com>
List-Archive: <https://groups.google.com/group/wx-dev
List-Subscribe: <https://groups.google.com/group/wx-dev/subscribe>, <mailto:wx-dev+s...@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+60...@googlegroups.com>,
<https://groups.google.com/group/wx-dev/subscribe>

Jouk Jansen

unread,
Oct 20, 2021, 9:59:46 AM10/20/21
to wx-...@googlegroups.com
VZ wrote on 19-OCT-2021 15:25:20.24

>JJ> spawn-valeta-jj) cxx /NOLIST/OBJECT=srchctlg/define=(__WXGTK__=1,WXBUILDING=1)/f
>JJ> loat=ieee/name=(as_is,short)/ieee=denorm /assume=(nostdnew,noglobal_array_new
>JJ> ) srchctlg.cpp/list/show=all
>JJ>
>JJ> wxBitmap::Rescale(bitmap, wxSize(x, y));
>JJ> ........^
>JJ> %CXX-E-MEMBERREFREQOBJ, a nonstatic member reference must be relative to a
>JJ> specific object
>JJ> at line number 1032 in file $DISK16:[JOUKJ.public.wxwidgets.wxwidgets_140214.wxW
>JJ> idgets.src.generic]srchctlg.cpp;3
[snip]
> Looks like a compiler bug to me. You could try redeclaring or "using" the
?static function in wxGTK1 wxBitmap class, maybe guarding it with the check
>for the compiler you're using.

I found out that the actual problem for my compiler is that (only for gtk1)
in the wxBitmap class another Rescale is defined. If you rename this Rescale
to something else it works. Can we, since it only affects wxGTK1, rename
this Rescale to i.e. RescaleGTK1?

Regards
Jouk

Vadim Zeitlin

unread,
Oct 20, 2021, 11:11:07 AM10/20/21
to wx-...@googlegroups.com
On Wed, 20 Oct 2021 15:47:44 +0200 (CEST) Jouk Jansen wrote:

JJ> I found out that the actual problem for my compiler is that (only for gtk1)
JJ> in the wxBitmap class another Rescale is defined.

Oh, indeed, thanks for noticing it, I've completely failed to see it.

JJ> If you rename this Rescale to something else it works. Can we, since it
JJ> only affects wxGTK1, rename this Rescale to i.e. RescaleGTK1?

It should be GTK1Rescale() to keep with our usual naming conventions but,
sure, please feel free to do it, I don't think anybody is using it, it was
removed from wxGTK(2+) back in 5852a1dcbb (remove Rescale(), it is no
longer used, 2009-01-04) and hopefully we shouldn't get any complaints
about removing it from wxGTK1 if we haven't got any so far.

Although adding "using" for the base class version would still be an even
simpler fix, AFAICS. But the choice is yours, I think (hope?) that you're
the only remaining user of wxGTK1 in the world.

Regards,
VZ

Jouk Jansen

unread,
Oct 21, 2021, 5:41:01 AM10/21/21
to wx-...@googlegroups.com
VZ wrote on 20-OCT-2021 17:11:41.67

> Although adding "using" for the base class version would still be an even
>simpler fix, AFAICS. But the choice is yours,

OK using is also working. Going to commit that change.

>I think (hope?) that you're the only remaining user of wxGTK1 in the world.
And some others running OpenVMS and have a need for wxWidgets.
Reply all
Reply to author
Forward
0 new messages