[Ace-users] Re: [tao-users] Newbie Question: Two different TAO tutorials end up with this compile error

Steve Totten totten_s at ociweb.com
Wed Jul 25 23:22:59 CDT 2007


Hi Anne,

De Wit, Anne wrote:
> Good day,

G'day!

> I am very new to CORBA. As such I am starting from the very basics and 
> have run through two different beginner tutorials:
> http://www.theaceorb.com/downloads/1.4a/index.html  Chapter 3 Getting Started (Messenger Application)
> http://download.theaceorb.nl/TPG.pdf   The Remedy IT Programmers Guide 
> (Hello World Application)
>  
> In both cases, after debugging the code (with heplfull compiler errors 
> that point to the line-numbers with syntax errors), I end up with 
> exactly the same error. I have attached the entire output of once of 
> these builds in the failed_build.txt attachment, but I assume the line 
> of interest is the first two:
>  
> obj/HelloC.o(.text+0x37): In function 
> `__static_initialization_and_destruction_0(int, int)':
> /root/TAO/anne/HelloC.cpp:129: undefined reference to `vtable for 
> TAO::TypeCode::Objref<char const*, TAO::Null_RefCount_Policy>'

These errors are actually coming from the linker, not the
compiler.  The problem is that the TypeCode-related symbols
could not be resolved in any of the libraries or object files
that are being linked into your executable.

>  I have looked on the internet and only found one reference to this. 
> Seeing as I am so new to CORBA and very amatuerish at C++, I am hoping 
> that this is some very simple matter that is so easy that it is not 
> documented anywhere :)
>  
> I have run this on two different systems:
> Redhat 9.0 and Fedore Core 5. Both give exactly the same error.
> I use "$ACE_ROOT/bin/mwc.pl - type gnuace" for the makefiles and then 
> simply 'make'
>  
> I have absolutely no idea how to resolve this and would much appreciate 
> any help on the matter.

I think we'll need a bit more information from you.  Most
importantly, what version of TAO you are using.  The best way to
report problems, even if you don't think the problem is in
ACE+TAO itself, is to use the PROBLEM-REPORT-FORM (or PRF).  You
will find it in the $TAO_ROOT directory.  Often, the answers to
your questions will depend upon your version and other aspects of
your environment and configuration settings.  Be sure to fill out
the PRF as completely as possible, then just send it this list.

Also, make sure you have built the TAO_AnyTypeCode library.  On
Linux, it will most likely be $ACE_ROOT/lib/libTAO_AnyTypeCode.so.
That is where the missing symbols should be defined.

It is possible you need to add the anytypecode base project to
the project definition(s) in your .mpc file, though I'm not 100%
certain about that.

HTH,
Steve
-- 
----------------------------------------------------------------
  Steve Totten, Principal Software Engineer and Partner
  Object Computing, Inc. (OCI), St. Louis, MO, USA
  http://www.ociweb.com/  http://www.theaceorb.com/
----------------------------------------------------------------



More information about the Ace-users mailing list