Re: [Fresco-devel] Problems compiling sample code

Håvard Skinnemoen <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On onsdag, juni 26, 2002, at 01:12 , Sean Rae wrote:

> I'm sending this to both the fresco and omniorb lists because the sample
> code is from the fresco configure script but I'm guessing that it's more
> of an omniORB (or, more likely, user error) problem.  The configure (in
> config/Warsaw/configure) script tries to compile with the string:
>
> g++ -o conftest -g -O2 blah.cxx -lpthread -lomnithread
>
> where blah.cxx is:
> #include "confdefs.h"
> #include <omnithread.h>
>
> int main()
> {
>   omni_mutex my_mutex;
>   return 0;
> }
>
> and the error it spits out is:
> from blah.cxx's line 6:
>  "undefined reference to 'omni_mutex::omni_mutex[in-charge]()"
> and from line 7:
>  "undefined reference to 'omni_mutex::~omni_mutex [in-charge]()"
> then I get an error from the __status_initialization_and_destruction_0
> function from like 541 in omnithread.h:
>  "undefined reference to 'omni_thread::init_t::init_t[in-charge]()'

It could be a compiler problem. IIRC the C++ ABI changed from GCC 2.95 
to 3.0, so libraries compiled with one won't link with stuff compiled 
with the other.

...
> (possibly nonworking) omniORB 3.0.5 installed.  Oh yeah, the only thing
> that is still nonworking is when I run 'nameclt list' I get
> "list: Cannot contact the Naming Service because of COMM_FAILURE."

That's probably related to /etc/omniORB.cfg. It should read something 
like

ORBInitRef NameService=corbaname::localhost

Have a look at chapter 1 and 4 of the omniORB User's Guide.

> But whenever I run omniNames manually it spits out a Root Context
> IOR:a135135 etc etc like it should.  Any help will be appreciated.  :)

The IOR string could be used instead of corbaname::... if you feel like 
it :)

Hope this helps,

Håvard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.