Tue Jun 21 09:39:48 2022: Request 128994 was acted upon.
Transaction: Correspondence added by imd...@gmail.com
       Queue: Wx
     Subject: Re: Perl Wx fails to Build -- ProperyGrid.c : error: call of 
overloaded ‘wxVariant(wxColour&)’ is ambiguous [rt.cpan.org #128994]
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: imd...@gmail.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=128994 >


James,
Ok here are my changes:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Error:
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 {

---------------------------------------------------------------
====================================================================
Error:
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;
        dXSTARG;

-       RETVAL = THIS->GetPixel();
+       //RETVAL = THIS->GetPixel();
+        RETVAL = NULL;
        XSprePUSH;
        PUSHi((IV)RETVAL);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
Makefile.PL"
Also note that we do not use property grid in our application ....
But the solution will be in updating the xsp files to match
wxWidgets-3.0.5
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
success.
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

Reply via email to