[omniORB] help in compilation of client / server code

mani usmangul66 at gmail.com
Tue Mar 6 16:12:36 GMT 2007


hi,
   i am new to omniORB. i have run the example programs. but i have problems
in making my own program. there are two ways specified.
1. compile using "omniidl -bcxx echo.idl"
2. use the ODE
now if i want to use ODE then will i have to write my own dir.mk files and
GNU make file? is there any help available for this.

the other option is to use omniIDL to generate .hh and .cc files and then
write  the client and server implementation. i did this but i dont know how
to compile these files. should i use standars C++ compilation commands for
this i.e. "g++ -o hello hello.cc". i did this but this gives error. i made
the file myecho.idl. cut and copy the code of echo.idl into it. and compiled
it to generate myecho.hh and myechoSK.cc. these three files are in the
present working directory. then i copied the eg1.cc into it and changed the
include file to myecho.hh and then tried to compile it.
this is what happened
:

"[root at localhost myecho]# pwd
/root/omniORB-4.0.7/src/examples/myecho
[root at localhost myecho]# g++ -o eg1 eg1.cc
eg1.cc:10:21: error: myecho.hh: No such file or directory
In file included from
/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../include/c++/4.1.0/backward/iostream.h:31,
                 from eg1.cc:16:
/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../include/c++/4.1.0/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X> header
for the <X.h> header for C++ includes, or <iostream> instead of the
deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
eg1.cc:21: error: expected class-name before ',' token
eg1.cc:22: error: 'PortableServer' has not been declared
eg1.cc:22: error: expected `{' before 'RefCountServantBase'
eg1.cc:22: error: invalid function declaration
eg1.cc:31: error: invalid use of undefined type 'class Echo_i'
eg1.cc:21: error: forward declaration of 'class Echo_i'
eg1.cc: In member function 'char* Echo_i::echoString(const char*)':
eg1.cc:33: error: 'CORBA' has not been declared
eg1.cc: At global scope:
eg1.cc:40: error: variable or field 'hello' declared void
eg1.cc:40: error: 'Echo_ptr' was not declared in this scope
eg1.cc:41: error: expected ',' or ';' before '{' token"

please tell me if i am doing something wrong.

-- 
usman gul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070306/4b9e073c/attachment.htm


More information about the omniORB-list mailing list