help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using gtkextra widgets in octave


From: Phil Cummins
Subject: using gtkextra widgets in octave
Date: Mon, 7 Jan 2002 01:41:45 -0600


Hello,

   I recently became aware of the C++ "wrappers" for
gtk and gtkextra widgets, see e.g.:
  http://gtkmm.sourceforge.net/
and
  http://gtkextramm.sourceforge.net/

and thought that maybe these would allow these widgets
to be used in dynamically-linked octave functions. I tried
changing some of the example programs by (1) including oct.h,
(2) using DEFUN_DLD to make the the functions known to octave, 
and (3) making them return an octave_value rather than exiting.
These can be made into .oct files by, e.g.:

% mkoctfile -I/usr/local/lib/gtkmm/include -I/usr/include/gtk-1.2 \
 -I/usr/include/glib-1.2  -I/usr/lib/glib/include \
 -I/usr/lib/sigc++/include -I/usr/local/include/gtkextra \
 -I/usr/local/include/gtkextra-- filesel.cc -L/usr/local/lib \
 -lgtkextra -lgtkmm -lgdkmm -lgtkextramm -L/usr/lib -L/usr/X11R6/lib \
 -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lsigc \
 -lpthread

and then called from octave. For the gtk+ file selection widget,
this seems to work fine. When I call the function from within
octave the file selection box comes up, I can use it to select
a file and return the file name.
  But what I am really keen to use is the gtkplot widget, which
is part of gtkextra. I applied exactly the same procedure as described
above to the gtkextramm plotcanvas example (I made it an octave
function called "test_canvas"). It compiles OK, but when I call this
from within octave, I get the following error:

error: /home/xochitl/cummins/bin/octave/test_canvas.oct: undefined symbol: 
__vt_Q34SigCt18AdaptorBindSlot0_12ZvZi4Node

My understanding is that this is a "mangled" function name, so
I used c++filt to "unmangle" it:
 
% c++filt __vt_Q34SigCt18AdaptorBindSlot0_12ZvZi4Node
SigC::AdaptorBindSlot0_1<void, int>::Node virtual table

So, apparently, it cannot find something in the sigc library(?).
Oddly, I get the above error even if I don't call any of the
gtketra functions - I tried just including the test_canvas code 
at the end of my file selection example and it failed with the 
same error, even though none of the functions from test_canvas
were every called.
  Does anyone have any idea how I might get around the above 
problem? I would be greatful for any suggestions.
  Please note that I am using a RedHat 7.2 system, with 
octave 2.1.34 installed from RPM. But the same problem 
appears with 2.1.35 compiled from source. The versions of
gtkmm and gtkextramm I have installed are 1.2.8 and 0.9.2,
respectively.
  Many thanks for any advice you can give.
Regards,

-- Phil

---------------------------------------------------------------------
Phil R Cummins                             address@hidden
Research Program for Plate Dynamics        tel(i/d):81/0-468-67-9771
IFREE/JAMSTEC, 2-15 Natsushima-cho         fax(i/d):81/0-468-67-9775
Yokosuka 237-0061, Japan            



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]