Re: tutorial on orbit



le lun 19-11-2001 à 21:39, Bharat Satyanarayan a écrit :
> hi
>  i have been trying to run the calculator example, in orbit-idl tutorial.
> even though the code is exact as shown there, it gives me following error.
> Calculator-server.o(.text+0x1be): undefined reference to
> `impl_Calculator_create
> '
> Calculator-server.o(.text+0x200): undefined reference to
> `PortableServer_POA_get
> _the_POAManager'
> i can't understand why is that so?
>  also is there any examples on callback client, where in the server
> invocates a method on client.

I have checked that the examples given still build with a newer version
of ORBit (i tried 0.5.12 ). It works. Which ORBit are you runnning ?

The impl_Calculator__create() function is part of the stubs generated
by orbit-idl and this one should go in calculator-impl.c in this
example.
Normally, the stubs are generated the first time with 
orbit-idl --skel-impl calculator.idl, which produces
calculator-skelimpl.c.

In this example calculator-impl.c is included in calculator-server.c.

So your output seems to indicate that the link does not include
calculator-server.o where the function definition lies.

The output of the make should look like :

[genaud@guenievre calculator]$ make
/usr/bin/orbit-idl calculator.idl
gcc -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/include/orbit-1.0   -c -o calculator-client.o calculator-client.c
gcc -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/include/orbit-1.0   -c -o calculator-common.o calculator-common.c
gcc -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/include/orbit-1.0   -c -o calculator-stubs.o calculator-stubs.c
gcc -o calculator-client calculator-client.o calculator-stubs.o
calculator-common.o  -lIIOP -lORBit -lORBitutil -L/usr/lib -lORBit
-lIIOP -lORBitutil -lglib -lmgcc -I/usr/include/glib-1.2
-I/usr/lib/glib/include -I/usr/include/orbit-1.0   -c -o
calculator-server.o calculator-server.c
gcc -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/include/orbit-1.0   -c -o calculator-skels.o calculator-skels.c
gcc -o calculator-server calculator-server.o calculator-skels.o
calculator-common.o  -lIIOP -lORBit -lORBitutil -L/usr/lib -lORBit
-lIIOP -lORBitutil -lglib -lm

Hope it helps.

-- 
Stéphane Genaud                                           
 IECS, Université Robert Schuman                           
 61 av. de la Forêt Noire, 67085 Strasbourg                 
 Bureau 107 tel : 0390414298                                 



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