#62 wxc- + WxWidgets 2.9 install problem


I'm trying to install reactive-banana-wx, but wxc won't compile.

When I try
cabal install wxc
I get a C++ compile error.

Making cabal constraints explicit shows me that this error occurs for wxc- through wxc-

My WxWidgets library is 2.9 and I installed it from a tarball (since it doesn't have a debian package).
cabal --version = 0.14.0 My cabal constraint file is the default.
ghc --version = 7.4.1
gcc --version = (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
OS version:
michael-x201% cat /proc/version
Linux version 3.2.0-31-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012

Also, the bad code is in a #ifdef case when the __WXGTK__ flag is enabled.

The C++ compiler error is:
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/incl
ude -I/usr/local/include/wx-2.9 -I/usr/local/lib/wx/include/gtk2-unicode
RL -fPIC -c src/cpp/eljpen.cpp -o dist/build/src/cpp/eljpen.o
src/cpp/eljpen.cpp: In function ‘void wxPen_GetStipple(void*, wxBitmap*)
src/cpp/eljpen.cpp:159:13: error: conversion from ‘long int’ to ‘const w
xBitmap’ is ambiguous
src/cpp/eljpen.cpp:159:13: note: candidates are:
/usr/local/include/wx-2.9/wx/gtk/bitmap.h:83:5: note: wxBitmap::wxBitmap
/usr/local/include/wx-2.9/wx/gtk/bitmap.h:73:5: note: wxBitmap::wxBitmap
(const char* const*)
/usr/local/include/wx-2.9/wx/gtk/bitmap.h:64:24: error: initializing a
rgument 1 of ‘wxBitmap& wxBitmap::operator=(const wxBitmap&)’

The offending code, in file src/cpp/eljpen.cpp, is:
EWXWEXPORT(void,wxPen_GetStipple)(void* self,wxBitmap* _ref)
#if defined(__WXGTK__)
*_ref = NULL;
*_ref = *(((wxPen*)self)->GetStipple());

To get it to compile I replaced the NULL on line 159 with wxBitmap();
Some examples in reactive-banana-wx now run so my fix didn't break everything.

So what's the problem? I'm pretty sure the wx 2.9 library it's using is the right one. Did no one check the __WXGTK__ case?


    • status: open --> closed-fixed
    • Group: --> confirmed