[Plplot-devel] Errors with wxwidgets bindings

2007-02-06 Thread Andrew Ross

There seems to be a bug in the version in Ubuntu Edgy (latest stable
version). The compilation fails with an error for a missing file, 
/usr/share/pygtk/2.0/defs/gtk-extrafuncs.defs

Touching this file solves the problem, but then fails with more errors.

/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:
In constructor 'wxPLplotstream::wxPLplotstream(wxDC*, int, int, long
int)':
/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
error: invalid conversion from 'const char*' to 'char*'
/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
error:   initializing argument 2 of 'int plstream::SetOpt(char*, char*)'

This is with pygtk 2.10.3 on Linux AMD64.

Anyone else having problems?

Andrew

On Sun, Feb 04, 2007 at 11:21:46PM +, Werner Smekal wrote:
 Update of /cvsroot/plplot/plplot/bindings/wxwidgets
 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16258/bindings/wxwidgets
 
 Added Files:
   CMakeLists.txt wxPLplotstream.cpp wxPLplotstream.h 
   wxPLplotwindow.cpp wxPLplotwindow.h 
 Log Message:
 Initial commit of wxwidgets bindings to plplot. This files provide an 
 interface to PLplot for wxwidgets applications, similar to the Gnome2 
 bindings. Basically a inherited class of plstream (wxPLplotstream) and a 
 widget (wxPLplotWindow) are made available. The wxWidgets bindings are 
 enabled via -DENABLE_wxwidgets=ON. If the wxWidgets driver is disabled the 
 bindings are disabled as well, since the wxWidgets bindings depend on the 
 wxWidgets driver.
 
 --- NEW FILE: wxPLplotwindow.h ---
 /* $Id: wxPLplotwindow.h,v 1.1 2007/02/04 23:21:44 smekal Exp $
 
Copyright (C) 2005  Werner Smekal
 
This file is part of PLplot.
 
PLplot is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
PLplot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Library General Public License for more details.
 
You should have received a copy of the GNU Library General Public License
along with PLplot; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
 USA
 */
 
 #if !defined( WXPLPLOTWINDOW_H__INCLUDED_ )
 #define WXPLPLOTWINDOW_H__INCLUDED_
 
 #include wx/window.h
 #include wx/dcmemory.h
 #include wxPLplotstream.h
 
 
 /*! A plot widget which takes care of double buffering and other stuff, but 
 does not
  *  provide an own plot API. You have to get a pointer to wxPLplotstream via 
 the 
  *  GetStream() method to gain access to the PLplot API.
  */
 class PLDLLIMPEXP wxPLplotwindow : public wxWindow
 {
 public:
   wxPLplotwindow( wxWindow* parent, wxWindowID id=-1, const wxPoint pos 
 = wxDefaultPosition,
   const wxSize size = wxDefaultSize, long style = 0,
   long pl_style = wxPLPLOT_NONE );   //! Constructor.
   ~wxPLplotwindow( void );  //! Deconstructor.
 
   void RenewPlot( void );   //! Redo plot.
   void SavePlot( const wxString driver, const wxString filename );  
 //! Save plot using a different driver.
   wxPLplotstream* GetStream()  { return m_stream; }  //! Get pointer to 
 wxPLplotstream of this widget.
   
 protected:
   virtual void OnPaint( wxPaintEvent event );   //! Paint event.
   virtual void OnErase( wxEraseEvent WXUNUSED(event) );   //! Erase 
 event.
 
 private:
   // variables regarding double buffering
   wxMemoryDC* MemPlotDC;  //! Pointer to wxMemoryDC, used for double 
 buffering
   int MemPlotDC_width;//! Saved width of MemoryDC, to find out if 
 size changed.
   int MemPlotDC_height;   //! Saved height of MemoryDC, to find out if 
 size changed.
   wxBitmap* MemPlotDCBitmap;  //! Pointer to bitmap, used for double 
 buffering.
 
 protected:
   wxPLplotstream* m_stream; //! Pointer to the wxPLplotstream 
 which belongs to this plot widget
 
   DECLARE_EVENT_TABLE()
 };
 
 
 #endif // !defined( WXPLPLOTWINDOW_H__INCLUDED_ )
 
 --- NEW FILE: wxPLplotwindow.cpp ---
 /* $Id: wxPLplotwindow.cpp,v 1.1 2007/02/04 23:21:44 smekal Exp $
 
Copyright (C) 2005  Werner Smekal
 
This file is part of PLplot.
 
PLplot is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
PLplot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Library General Public License for more details.
 

Re: [Plplot-devel] Errors with wxwidgets bindings

2007-02-06 Thread Werner Smekal
Hi Andrew,

I really start to hate Unicode since this is the source of these 
problems. Anyway, you could disable for now the bindings with 
-DENABLE_wxwidgets=OFF. I'll rewrite this part soon and cvs the changes 
so you can test it.

Thanks,
Werner

Andrew Ross wrote:
 There seems to be a bug in the version in Ubuntu Edgy (latest stable
 version). The compilation fails with an error for a missing file, 
 /usr/share/pygtk/2.0/defs/gtk-extrafuncs.defs
 
 Touching this file solves the problem, but then fails with more errors.
 
 /home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:
 In constructor 'wxPLplotstream::wxPLplotstream(wxDC*, int, int, long
 int)':
 /home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
 error: invalid conversion from 'const char*' to 'char*'
 /home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
 error:   initializing argument 2 of 'int plstream::SetOpt(char*, char*)'
 
 This is with pygtk 2.10.3 on Linux AMD64.
 
 Anyone else having problems?
 
 Andrew
 
-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
+43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Errors with wxwidgets bindings

2007-02-06 Thread Alan W. Irwin
On 2007-02-06 12:27-0800 Alan W. Irwin wrote:

 However, when I tried the same build on Debian Dapper (one earlier version
 than Andrew's Debian Edgy) I got similar errors to Andrew's.  Nevertheless,
 the good Debian stable result shows you are close to having everything
 working on all Linux platforms.

Since your last commits, all seems to be well on Debian Dapper now with
the build and install.  However, I could not get wxPLplotDemo.cpp to
build in the installed examples tree because the compilation flags have
not been configured properly in plplot(d)-wxwidgets.pc.  I also suspect
there may be a unicode problem for that example as well because of strange
characters in the compiler error output such as

/usr/include/wx-2.6/wx/event.h: In copy constructor â:
/usr/include/wx-2.6/wx/event.h:922: error: class â does not have any field
named â

BTW, to attempt to build the example in the install tree I tried the
following command (wrapped for e-mail) following the pattern I got from the
first example, x01:

/usr/bin/c++ wxPLplotDemo.cpp -o wxPLplotDemo -Wl,-rpath 
-Wl,/home/software/plplot_cvs/installcmake/lib:/home/software/autotools/install/lib
`PKG_CONFIG_PATH=/home/software/plplot_cvs/installcmake/lib/pkgconfig
pkg-config --cflags --libs plplotd-wxwidgets`

On your Linux box, the rpath and PKG_CONFIG_PATH values will be different, but
you get the idea.

To sum up the current problem, the configured plplotd-wxwidgets.pc file
has

Cflags: -I${includedir}

and, of course, you need a lot more information there in order to have a
successful, wxwidgets-related compilation.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel