Gnumeric automation using gnorba/goad/oaf/whatever?
- From: Tommi Hassinen <thassine messi uku fi>
- To: gnumeric-list gnome org
- Subject: Gnumeric automation using gnorba/goad/oaf/whatever?
- Date: Sun, 10 Mar 2002 17:29:06 +0200 (WET)
Hi all.
I'm trying to build a simple "hello world" style program that would
remote-control a gnumeric workbook using a CORBA interface. Similar
program in fact exists in CVS in corba-test directory, I just don't
have a gtk2/gnome2 box yet so that I could try it.
Please don't tell me that this is an obsolete approach and I should build
a new fancy bonobo component or something! :) I really need this and I'm
ready to do what I can for this. So, can I configure gnumeric CVS version
for gnome1.4, or is there a branch in CVS for gnome1.4? Is there any other
program, simpler than gnumeric, that could provide an example of goad
automation?
Now I present my own, simple & stupid, approach; any comments why this
doesn't work?
Makefile:
^^^^^^^^^
CFLAGS = `gnome-config --cflags gnome gnorba` \
`orbit-config --cflags` \
-Wall
LIBS = `gnome-config --libs gnome gnomeui gnorba bonobo` \
`orbit-config --libs client` -lgnorba
gnumtest:
g++ -c $(CFLAGS) gnumtest.cpp
g++ -o gnumtest *.o $(LIBS)
clean:
rm gnumtest.o gnumtest
generate-idl:
orbit-idl -I/usr/share/idl /usr/share/gnumeric/1.0.4-bonobo/idl/GNOME_Gnumeric.idl
compile-idl:
gcc -c $(CFLAGS) GNOME_Gnumeric-common.c
gcc -c $(CFLAGS) GNOME_Gnumeric-stubs.c
gcc -c $(CFLAGS) GNOME_Gnumeric-skels.c
gnumtest.cpp:
^^^^^^^^^^^^^
// see gnumeric/corba-test/gnumeric-corba-test.c at gnumeric CVS
#include <iostream.h>
using namespace std;
//#include <gnome.h>
//#include <orb/orbit.h>
//#include <liboaf/liboaf.h>
#include <libgnorba/gnorba.h>
#include "GNOME_Gnumeric.h"
int main(int argc, char ** argv)
{
CORBA_Environment ev;
CORBA_ORB orb;
CORBA_exception_init(& ev);
orb = gnome_CORBA_init("Gnumeric client test", "1.0", & argc, argv, (GnorbaInitFlags) 0, & ev);
// orb = gnome_CORBA_init("Gnumeric client test", "1.0", & argc, argv, & ev); //OLD???
// orb = CORBA_ORB_init(& argc, argv, "orbit-local-orb", & ev);
GNOME_Gnumeric_Workbook workbook;
workbook = goad_server_activate_with_id(NULL, "GOADID:GNOME:Gnumeric:Workbook:1.0",
(GoadActivationFlags) 0, (const char **) NULL);
if (workbook == CORBA_OBJECT_NIL)
{
cout << "Cannot bind workbook" << endl;
exit (1);
}
// show the workbook
// GNOME_Gnumeric_Workbook_show(workbook, 1, &ev);
// end
CORBA_exception_free(&ev);
return 0;
}
// end
After stages
make generate-idl
make compile-idl
make
I always get, in the linking stage:
gnumtest.o: In function `main':
gnumtest.o(.text+0x31): undefined reference to `gnome_CORBA_init(char
const *, char const *, int *, char **, GnorbaInitFlags,
CORBA_Environment_type *)'
gnumtest.o(.text+0x49): undefined reference to
`goad_server_activate_with_id(GoadServerList *, char const *,
GoadActivationFlags, char const **)'
collect2: ld returned 1 exit status
make: *** [gnumtest] Error 1
I use a debian "testing" box, and it seems to be impossible to link
correctly those libgnorba functions. The libgnorba libs, both .a and .so
ones, seem to be OK and they contain the strings.
So, what's the problem here; is it debian, gnumeric, or just me? :)
Tommi Hassinen
thassine messi uku fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]