[Pkg-ace-devel] Problems with CosNamingC.h...

Thomas Girard thomas.g.girard at free.fr
Wed Oct 24 08:19:00 UTC 2007


Hello Ari,

On Wed, Oct 24, 2007 at 01:45:48AM -0500, Ari Wilson wrote:
> I have installed the following packages from the Ubuntu Feisty Fawn Universe
> repositories:
> libace5.4.7c2a
> libace-dev
> libtao1.4.7c2a
> libtao-dev
> libtao-orbsvcs1.4.7c2a
> libtao-orbsvcs-dev
> 
> I have set $ACE_ROOT in my .zshrc to:
> /usr/share/ace
> And $TAO_ROOT:
> $ACE_ROOT/TAO
> (Incidentally, is there a better place to put these environment variables
> than my .zshrc? Do they need to be present at all? I am used to working with
> ACE's manual Windows installation where you have to set all these things up
> to compile ACE/TAO so I'm not sure if they're really needed at all with
> these packages. I am a bit of a Linux neophyte.)

It depends on how you compile your program. If you're using MPC, they
should be set. If you're using a hand-written makefile, then you're on
your own and you don't necessarily need them, though they can be usefull
shortcuts.

> I have a client/server program that uses the CORBA naming service. This line
> is in that program:
> #include "orbsvcs/orbsvcs/CosNamingC.h"$
> 
> Whenever I compile the program I get this nonsense:
> In file included from client.cpp:2:
> /usr/share/ace/TAO/orbsvcs/orbsvcs/CosNamingC.h:43:42: error:
> orbsvcs/Naming/naming_export.h: No such file or directory
> /usr/share/ace/TAO/orbsvcs/orbsvcs/CosNamingC.h:93: error:
> âTAO_Naming_Exportâ has not been declared
> /usr/share/ace/TAO/orbsvcs/orbsvcs/CosNamingC.h:93: error: expected
> initializer before âconstâ
> /usr/share/ace/TAO/orbsvcs/orbsvcs/CosNamingC.h:116: error: invalid function
> declaration
> /usr/share/ace/TAO/orbsvcs/orbsvcs/CosNamingC.h:128: error: âstruct
> CosNaming::TAO_Naming_Export::CORBAâ has not been declared
> ... (a bunch of other error messages related to the first one)
> 
> Manually adding $ACE_ROOT/TAO/orbsvcs to my Makefile produces the following
> compiler errors:
> /home/wilsona6/projects/CORBA_license/trunk/client.cpp:55: undefined
> reference to `CosNaming::NamingContext::_narrow(CORBA::Object*)'
> /home/wilsona6/projects/CORBA_license/trunk/client.cpp:57: undefined
> reference to `CosNaming::Name::Name(unsigned int)'
> /home/wilsona6/projects/CORBA_license/trunk/client.cpp:78: undefined
> reference to `CosNaming::Name::~Name()'
> /home/wilsona6/projects/CORBA_license/trunk/client.cpp:78: undefined
> reference to `CosNaming::Name::~Name()'
> client.o: In function `~TAO_Objref_Var_T':
> /usr/share/ace/TAO/tao/Objref_VarOut_T.cpp:30: undefined reference to
> `TAO::Objref_Traits<CosNaming::NamingContext>::release(CosNaming::NamingContext*)'

Good, this is indeed what you needed to do.

> At this point, I am stuck. Any help would be great!

You probably need to add -lTAO_CosNaming to your link command.

Regards,

Thomas



More information about the Pkg-ace-devel mailing list