problems with test-gnumeric-corba.c



Hello all.

I have problems with the corba-test/test-gnumeric-corba.c that is in the
CVS.

I haven't been able to configure the CVS version for my system, but I have
compiled gnumeric-1.0.0 and included the corba-test directory in this
tree. With following modifications to test-gnumeric-corba.c I have
successfully compiled it:

        1) remove #include <gnumeric-config.h>
        2) change #include <Gnumeric.h>
           to #include <GNOME_Gnumeric.h>
        3) comment out GNOME_Gnumeric_Workbook_show (workbook, 1, &ev);

When I compile and link it using commands

gcc -c `gnome-config --cflags bonobo` -I../idl test-gnumeric-corba.c 
gcc test-gnumeric-corba.o `gnome-config --libs gnomeui bonobo` -L../idl ../idl/libGnumericIDL.a -lgnorba

the resulting program is unable to open the CORBA link; it just says
"Cannot bind workbook".

The test-gnumeric-corba.c example uses gnorba, that is going to be
obsolete. I also tried to open a link using oaf in a similar manner,
from C++ this time:

// see gnumeric/corba-test/gnumeric-corba-test.c at gnumeric CVS
#include <iostream.h>
using namespace std;

#include <liboaf/liboaf.h>
#include "GNOME_Gnumeric.h"

int main(int argc, char ** argv)
{
        CORBA_Environment ev;
        GNOME_Gnumeric_Workbook workbook;

        oaf_init(argc, argv);
        workbook = oaf_activate_from_id("OAFIID:GNOME_Gnumeric_Workbook", (OAF_ActivationFlags) 0, NULL, & 
ev);
        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;
}

This example quickly flashes the gnumeric screen, but again spits out
"Cannot bind workbook".

How could I fix the gnumeric-corba-test.c example?

I would like to use this simple approach used in gnumeric-corba-test.c
because it is the easiest way to get started and it perfectly suits in
my needs.

I already posted a question on Sunday as a non-member of the list, 
but it was forwarded to list moderator and is probably buried under the
Mountains of Spam. So, I'm sorry if there are multiple posts!

Thanks,

        Tommi Hassinen





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