Hi all,
i've simplified my idl in order to reproduce the constellation which causes the 
Microsoft C++ Compiler 7.1 to crash.
The problem occurs when deriving an interface from an abstract base interface.
Please look at the foolowing idl snipset:

module test {
  abstract interface AbstractBase {
  };
  interface TestIF : AbstractBase {
        void op(in string s, in string sz);
  };
};

The compiler crashes when trying to compile the classes generated by mico 
2.3.12 IDL compiler.

The following code is part of testIF.cxx

test::AbstractBase_ptr
test::AbstractBase::_narrow( CORBA::Object_ptr _obj )
{
  test::AbstractBase_stub* _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( 
"IDL:com.psibt.framework.nube/test/AbstractBase:1.0" )))
      return _duplicate( (test::AbstractBase_ptr) _p );
    if (!strcmp (_obj->_repoid(), 
"IDL:com.psibt.framework.nube/test/AbstractBase:1.0") || _obj->_is_a_remote 
("IDL:com.psibt.framework.nube/test/AbstractBase:1.0")) {
      _o = new test::AbstractBase_stub;
      _o->CORBA::Object::operator=( *_obj );   // <--- The compiler reports the 
internal error at this line
      return _o;
    }
  }
  return _nil();
}

Unfortunately i can'nt avoid the usage of abstract base interfaces in my real 
project.
Any suugestions how to work arround the problem ?

Best regards
Andrej

-----Ursprüngliche Nachricht-----
Von: Karel Gardas [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 8. Februar 2006 12:47
An: Rippich, Andrej
Cc: [email protected]
Betreff: Re: [mico-devel] Compilationproblems using VC++ 7.1


Hi,

On Tue, 7 Feb 2006, Rippich, Andrej wrote:

> Hi all,
> because i'm encountering internal compiler errors when trying to port a 
> project from mico 2.3.6/VC++ 6.0 to 2.3.12/VC++7.1, i've tryed to 
> compile the project using the combination 2.3.6. with VC++ 7.1.

I would really recommend you to stick to 2.3.12 and try hard to 
solve/workaround MS bugs.

> I have to use VC++ 7.1, because the code is part of a biggger project. A 
> Patch provided by Micorosoft to solve the internal compiler error 
> does'nt help. The internal compiler error does'nt occur, but i'm getting 
> the following error in the code generated by the idl compiler:
>
> C2064: term does not evaluate to a function taking 3 arguments
>
> The Error occurs in a method
>
> bool POA_model::Session::dispatch (CORBA::StaticServerRequest_ptr __req)
>
> Session is an Interface defined in one of the idls.
>
> Please look at the following code snipset:
>
>        ...
>
>        model::AbstractSession_var session;
>        model::ClientInfo client;
>        CORBA::String_var message;
>
>         ...
>
>        #ifdef HAVE_EXCEPTIONS
>        try {
>        #endif
> ------>       message( session.inout(), client, message.inout() );
>        #ifdef HAVE_EXCEPTIONS
>        } catch( ::model::NotLoggedInException_catch &_ex ) {
>          __req->set_exception( _ex->_clone() );
>          __req->write_results();
>          return true;
>        } catch( ::model::ObjectAccessException_catch &_ex ) {
>          __req->set_exception( _ex->_clone() );
>          __req->write_results();
>          return true;
>        } catch( ::model::Internal_catch &_ex ) {
>          __req->set_exception( _ex->_clone() );
>          __req->write_results();
>          return true;
>        }
>        #endif
>        __req->write_results();
>        return true;
>
> The code looks valid to me, because "message" (the method is Part of my 
> idl Interface) is a abstract member function of POA_model::Session. When 
> i try to change the code in order to call the Method full qualified, i'm 
> getting a linker error nc_dll error LNK2019: unresolved external symbol 
> "public: virtual void __thiscall POA_model::Session::message(class 
> model::AbstractSession *,struct model::ClientInfo const &,char const *)" 
> ([EMAIL PROTECTED]@POA_model@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL 
> PROTECTED]) 
> referenced in function $L190004
>
> Any suggestions ?

Try to simplify your code to self-contained simple as possible test-case. 
When this is done we can try to see what's possible to do with this issue. 
-- I'm talking here about your 2.3.12/VC++ attempt where you get internal 
compiler errors.

Cheers,
Karel
--
Karel Gardas                  [EMAIL PROTECTED]
ObjectSecurity Ltd.           http://www.objectsecurity.com
---
Need experienced, fast, reliable technical MICO support?
---> http://www.objectsecurity.com/mico_commsup_referral.html <---
---

_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to