Hello,

I've just committed (r13136) an initial attempt at creating smoke 
bindings for the qtwidget and extqt drivers.

A description of smoke:
https://techbase.kde.org/Development/Languages/Smoke

Basically smoke makes it easy (or at least easier) to write binding for 
Qt and KDE from scripting languages, or from Lisp, which was why I was 
interested. In our case these binding make it easier to integrate the Qt 
drivers into an existing Qt application that is being developed in 
languages such as Perl, Ruby, C# or Lisp.

However, it does not quite work yet and I would appreciate it if someone 
who is more knowledgeable about cmake could take a look at 
bindings/qt_gui/smoke/CMakeLists.txt and suggest what I might be doing 
wrong. Basically what happens is that the program smokegen parses the 
qt.h file to decide how to create the smoke bindings .cpp files. These 
are then linked to create the smoke bindings library, libsmokeplplotqt. 
The problem that I'm having is that it seems to think that it should use 
float for PLFLT instead of double at the generation stage, but then the 
compiler errors out at the linking stage because it doesn't know how to 
convert float* to double*. If I create the smoke bindings by hand 
against the installed PLplot library as described here:

https://github.com/HazenBabcock/cl-plplot/blob/master/commonqt-plot/README.txt

then everything seems to work fine. My guess is that is because in the 
installed version the question of whether PLFLT will be a float or a 
double has already been resolved.

This is the error message that I'm getting:
Scanning dependencies of target smokeplplotqt
[ 93%] Building CXX object 
bindings/qt_gui/smoke/CMakeFiles/smokeplplotqt.dir/smokedata.cpp.o
[ 95%] Building CXX object 
bindings/qt_gui/smoke/CMakeFiles/smokeplplotqt.dir/x_1.cpp.o
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp: In 
member function ‘void __smokeplplotqt::x_QtPLDriver::x_10(Smoke::Stack)’:
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:103:230: 
error: no matching function for call to 
‘__smokeplplotqt::x_QtPLDriver::setGradient(int, int, int, int, unsigned 
char*, unsigned char*, unsigned char*, float*, int)’
 
this->QtPLDriver::setGradient((int)x[1].s_int,(int)x[2].s_int,(int)x[3].s_int,(int)x[4].s_int,(unsigned
 
char*)x[5].s_class,(unsigned char*)x[6].s_class,(unsigned 
char*)x[7].s_class,(float*)x[8].s_class,(int)x[9].s_int);
 
 
 
                  ^
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:103:230: 
note: candidate is:
In file included from 
/home/hbabcock/OpenSource/plplot-trunk/bindings/qt_gui/smoke/plplotqt.h:1:0,
                  from 
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:2:
/home/hbabcock/OpenSource/plplot-trunk/include/qt.h:135:18: note: 
virtual void QtPLDriver::setGradient(int, int, int, int, unsigned char*, 
unsigned char*, unsigned char*, PLFLT*, PLINT)
      virtual void setGradient( int x1, int x2, int y1, int y2,
                   ^
/home/hbabcock/OpenSource/plplot-trunk/include/qt.h:135:18: note:   no 
known conversion for argument 8 from ‘float*’ to ‘PLFLT* {aka double*}’
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp: In 
member function ‘virtual void 
__smokeplplotqt::x_QtPLDriver::setGradient(int, int, int, int, unsigned 
char*, unsigned char*, unsigned char*, float*, int)’:
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:323:73: 
error: no matching function for call to 
‘__smokeplplotqt::x_QtPLDriver::setGradient(int&, int&, int&, int&, 
unsigned char*&, unsigned char*&, unsigned char*&, float*&, int&)’
          this->QtPLDriver::setGradient(x1, x2, x3, x4, x5, x6, x7, x8, x9);
                                                                          ^
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:323:73: 
note: candidate is:
In file included from 
/home/hbabcock/OpenSource/plplot-trunk/bindings/qt_gui/smoke/plplotqt.h:1:0,
                  from 
/home/hbabcock/OpenSource/plplot_build/bindings/qt_gui/smoke/x_1.cpp:2:
/home/hbabcock/OpenSource/plplot-trunk/include/qt.h:135:18: note: 
virtual void QtPLDriver::setGradient(int, int, int, int, unsigned char*, 
unsigned char*, unsigned char*, PLFLT*, PLINT)
      virtual void setGradient( int x1, int x2, int y1, int y2,
                   ^
/home/hbabcock/OpenSource/plplot-trunk/include/qt.h:135:18: note:   no 
known conversion for argument 8 from ‘float*’ to ‘PLFLT* {aka double*}’
make[2]: *** 
[bindings/qt_gui/smoke/CMakeFiles/smokeplplotqt.dir/x_1.cpp.o] Error 1
make[1]: *** [bindings/qt_gui/smoke/CMakeFiles/smokeplplotqt.dir/all] 
Error 2
make: *** [all] Error 2


You'll have to edit the qt.cmake file to ENABLE_smoke. In addition, on 
debian you need the following packages:
smoke-dev-tools
libsmokeqt4-dev

Thank you,
-Hazen


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to