[omniORB] omniEvents & cygwin

Alex Tingle alex at firetree.net
Mon Apr 5 01:14:12 BST 2004


Thanks for trying the experimental omniEvents. I think I can fix your
compilation problems:

On Sun, 04 Apr 2004 21:06:55 +0800
caoy <guaguo at vip.sina.com> wrote:
> make[1]: Entering directory
> `/home/omniORB-4.0.3/contrib/omniEvents-2_5_1/src' g++ -c
> -I/usr/local/include  -DHAVE_CONFIG_H  -I../idl -I../src
> -DENABLE_CLIENT_IR_SUPPORT=1 -g -O2 -fPIC  omniEventsLog.cc cc1plus:
> warning: -fPIC ignored for target (all code is position independent)
> omniEventsLog.cc: In constructor
> `OmniEvents::omniEventsLog::omniEventsLog(int, 
>    const char*)':
> omniEventsLog.cc:308: error: invalid conversion from `int' to `const
> char*' omniEventsLog.cc:308: error:   initializing argument 1 of `
>    std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, 
>    std::_Ios_Openmode) [with _CharT = char, _Traits =
>    std::char_traits<char>]'

You don't have a constructor for ifstream from C style FILE. A
workaround (NOT a proper fix) is to change it from 
  ifstream persiststream(fileno(file));
to:
  fclose(file);
  ifstream persiststream(active);

> omniEventsLog.cc: In member function `void 
>    OmniEvents::omniEventsLog::openOfstream(std::ofstream&, const
>    char*, int, int*)':
> omniEventsLog.cc:659: error: invalid conversion from `int' to `
>    std::_Ios_Openmode'
> omniEventsLog.cc:659: error:   initializing argument 2 of `void 
>    std::basic_ofstream<_CharT, _Traits>::open(const char*,
>    std::_Ios_Openmode) [with _CharT = char, _Traits =
>    std::char_traits<char>]'

This is the same problem that we see in GCC3. Look in README.gcc for a
fix. (Don't try to apply the patch it's not for v2.5.1 - just make the
change manually.)

Let me know how you get on.

-Alex Tingle



More information about the omniORB-list mailing list