develooper Front page | perl.wxperl.users | Postings from June 2022

From: via RT
June 23, 2022 21:12

Message ID:
Tue Jun 21 09:39:48 2022: Request 128994 was acted upon.
Transaction: Correspondence added by
       Queue: Wx
     Subject: Re: Perl Wx fails to Build -- ProperyGrid.c : error: call of overloaded ‘wxVariant(wxColour&)’ is ambiguous [ #128994]
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
      Status: open
 Ticket <URL: >

Ok here are my changes:

PropertyGrid.c: In function ‘void
XS_Wx__ColourProperty_SetPlValue(PerlInterpreter*, CV*)’:
PropertyGrid.c:27187:49: error: call of overloaded
‘wxVariant(wxColour&)’ is ambiguous
27187 |                 wxVariant value = wxVariant(*col);
      |                                                 ^
In file included from ../../cpp/helpers.h:19,
                 from ../../cpp/wxapi.h:170,
                 from PropertyGrid.c:23:

@@ -27184,7 +27184,7 @@
             if( col->IsOk() ) {
-                wxVariant value = wxVariant(*col);
+                wxVariant value = wxAny(*col);
                 THIS->SetValue(value, NULL, flags );
                 RETVAL = true;
             } else {

GDI.c: In function ‘void XS_Wx__Colour_GetPixel(PerlInterpreter*, CV*)’:
GDI.c:12704:24: error: ‘class wxColour’ has no member named ‘GetPixel’
12704 |         RETVAL = THIS->GetPixel();
      |                        ^~~~~~~~
make: *** [Makefile:454: GDI.o] Error 1


@@ -12701,7 +12701,8 @@
        long    RETVAL;

-       RETVAL = THIS->GetPixel();
+       //RETVAL = THIS->GetPixel();
+        RETVAL = NULL;
My method was to build and install wxWidgets-3.0.5  in our own folder
(where I also build and install perl)
(/opt/perlbuild/Perl64-5.36.0/local-libs)   if after you install
wxWidgets.    you set your path to
/opt/perlbuild/Perl64-5.36.0/local-libs/bin (this till point to
wx-conf, etc.)   then Alien-wxWidgets wtll find it and not try to
rebuild it.

Above changes (n diff form)  allow one to compile Wx-Perl.     Note
that you will have to update the two .c files after every "perl
Also note that we do not use property grid in our application ....
But the solution will be in updating the xsp files to match
The GetPixel returning NULL does not affect our application either, but YMMV!
At one time I started updating the actuall XS and xsp files from
headers and did get a version that worked with Visual Studio ( there
were other issues though.)    I may revisit that code for
unix/OSX/linux platforms and revisit Windows afterwards, which if I
could get it all working would be an update to WxPerl.   I am assuming
that they are using some tool to generate the .xsp/XS files.  I also
started down that road to try to create my own Wx-Perl --- with little
Anyway, I hope this helps you.  Let me know if you can tweak the xsp
files in way that works (that would be more proper than my hack of .c
/ .cpp files.  )
Good hunting,
Don Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About