CosNaming



Hi All,

I'm tryng to use the CosNaming Service , I have the nex code:

 #include <stdio.h>
#include "reloj-impl.c"
#include <ORBitservices/CosNaming.h>
#include <orb/orbit.h>

[...]

 
CosNaming_NamingContext *root_name;
CosNaming_NameComponent name_component[1] = { {"MyReloj","server"} };
CosNaming_Name name = {1 ,1 ,name_component, CORBA_FALSE};

[...]
 

root_name = CORBA_ORB_resolve_initial_references (orb,"NameService", ev);

CosNaming_NamingContext_bind(&root_name, &name, reloj, ev);
 

and when use the make (gcc)  The netx error

[rema linux-des time3]$ make
orbit-idl reloj.idl
gcc `orbit-config --cflags server`   -c reloj-client.c -o reloj-client.o
reloj-client.c: In function `main':
reloj-client.c:42: warning: assignment makes pointer from integer without a cast
gcc `orbit-config --cflags server`   -c reloj-common.c -o reloj-common.o
gcc `orbit-config --cflags server`   -c reloj-stubs.c -o reloj-stubs.o
gcc -o reloj-client reloj-client.o reloj-stubs.o \
reloj-common.o  -lIIOP -lORBit -lORBitutil `orbit-config --libs server`
gcc `orbit-config --cflags server`   -c reloj-server.c -o reloj-server.o
reloj-server.c: In function `main':
reloj-server.c:58: warning: assignment from incompatible pointer type
reloj-server.c:60: warning: passing arg 1 of `CosNaming_NamingContext_bind' from incompatible pointer type
gcc `orbit-config --cflags server`   -c reloj-skels.c -o reloj-skels.o
gcc -o reloj-server reloj-server.o reloj-skels.o \
reloj-common.o  -lIIOP -lORBit -lORBitutil `orbit-config --libs server`
reloj-server.o: In function `main':
reloj-server.o(.text+0x27a): undefined reference to `CosNaming_NamingContext_bind'
collect2: ld returned 1 exit status
make: *** [reloj-server] Error 1

What could be wrong??
 
 
 
 

begin:vcard 
n:Maldonado;Rene 
tel;cell:044 67 04 1776
tel;home:681-21-24
tel;work:638-46-93
x-mozilla-html:FALSE
org:Telefonos del Noroeste;Sistemas
adr:;;;Tijuana;Baja California;22000;Mexico
version:2.1
email;internet:remal telnor com
title:Ing. Computacion
fn:Rene Maldonado
end:vcard


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