Re: Question on compiling Orbacus on Windows using bcc32
Frederico Faria <[email protected]>
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Message-ID | <[email protected]> |
Hi Darren,
Thank you. The problem is resolved.
I had to resolve other 2 issues to compile fully:
1- Define the CC macro
2- Set the LIB path ( with -L ) to the "Lib"
directory in C++ Borland installation.
Regards,
Frederico Faria
--- Darren Middleman <[email protected]>
escreveu:
> Hi Frederico,
>
> >
> > Thank you for your attention. You are right! The
> > build doesn´t stop on error. I have been a Linux
> gcc
> > native developer. I have few Windows tricks.
> >
> > I verified the compiler output and the first error
> > output is attached:
> >
> > Compile version: Borland C++ 5.5.1 for Win32
> Copyright
> > (c) 1993, 2000 Borland
> >
> > do you have any hint ?
> >
> > [...]
> >
> > POAManager_impl.cpp:
> > Warning W8078 POAManager_impl.cpp 223: Throw
> expression violates exception
> > specification in function
> > POAManager_impl::POAManager_impl(ORBInstance
> *,POALocator *,const char *,
> > char *,const OCI::Acceptor
> > q &,const PolicyList &)
> throw(PolicyError,SystemException)
> > rning W8078 POAManager_impl.cpp 312: Throw
> expression violates exception
> > specification in function
> > OAManager_impl::POAManager_impl(ORBInstance
> *,POALocator *,const char *,
> > char *,const OCI::Acceptor
> > q &,const PolicyList &)
> throw(PolicyError,SystemException)
> > rning W8078 POAManager_impl.cpp 346: Throw
> expression violates exception
> > specification in function
> > OAManager_impl::POAManager_impl(ORBInstance
> *,POALocator *,const char *,
> > char *,const OCI::Acceptor
> > q &,const PolicyList &)
> throw(PolicyError,SystemException)
> > ror E2034 POAManager_impl.cpp 531: Cannot convert
> 'String_var' to 'char *'
> > in function POAManager_
> > pl::activate()
>
throw(PortableServer::POAManager::AdapterInactive,SystemException)
> > ror E2340 POAManager_impl.cpp 531: Type mismatch
> in parameter 1 (wanted
> > 'char *', got 'String_var'
> > in function POAManager_impl::activate()
> >
>
throw(PortableServer::POAManager::AdapterInactive,SystemException)
> > ror E2034 POAManager_impl.cpp 584: Cannot convert
> 'String_var' to 'char *'
> > in function POAManager_
> > pl::hold_requests(bool)
> throw(PortableServer::POAManager::AdapterInactive,
> > SystemException)
> > ror E2340 POAManager_impl.cpp 584: Type mismatch
> in parameter 1 (wanted
> > 'char *', got 'String_var'
> > in function POAManager_impl::hold_requests(bool)
> > throw(PortableServer::POAManager::AdapterInactive
> > ystemException)
> > ror E2034 POAManager_impl.cpp 641: Cannot convert
> 'String_var' to 'char *' in
> > function POAManager_
> > pl::discard_requests(bool)
> throw(PortableServer::POAManager::AdapterInactive,
> > SystemException)
> > ror E2340 POAManager_impl.cpp 641: Type mismatch
> in parameter 1 (wanted
> > 'char *', got 'String_var'
> > in function
> POAManager_impl::discard_requests(bool)
> > throw(PortableServer::POAManager::AdapterInact
> > e,SystemException)
> > ror E2034 POAManager_impl.cpp 703: Cannot convert
> 'String_var' to 'char *'
> > in function POAManager_
> > pl::deactivate(bool,bool)
> throw(PortableServer::POAManager::AdapterInactive,
> > SystemException)
> > ror E2340 POAManager_impl.cpp 703: Type mismatch
> in parameter 1 (wanted 'char *',
> > got 'String_var'
> > in function POAManager_impl::deactivate(bool,bool)
>
> > throw(PortableServer::POAManager::AdapterInacti
> > ,SystemException)
> > ror E2034 POAManager_impl.cpp 944: Cannot convert
> 'String_var' to 'char *'
> > in function POAManager_
> > pl::_OB_getAdapterManagerId()
> throw(SystemException)
> > * 9 errors in Compile ***
>
> Please CC [email protected] so that you address
> the whole team and
> community. This will help ensure an answer in the
> event that I become
> unavailable.
>
> It appears that the Borland compiler is having
> trouble performing some
> implicit type conversions with String_var types.
> I've attached a modified
> POAManager_impl.cpp file so that the compiler
> doesn't need to do this. You
> should replace the POAManager_impl.cpp file that is
> located in the
> ob/src/library directory with the attached file and
> rebuild Orbacus.
>
> I'm also attaching the file Stream.cpp, which I
> found had similar problems.
> Again, replace the existing Stream.cpp file in
> ob/src/library with the
> attached Stream.cpp.
>
> Regards,
> Darren
>
> --
> Darren Middleman, Software Engineer
> Team Orbacus - Your CORBA Source
> Email: mailto:[email protected]
> WWW: http://www.orbacus.com/
> > //
>
**********************************************************************
> //
> // Copyright (c) 2002
> // IONA Technologies, Inc.
> // Waltham, MA, USA
> //
> // All Rights Reserved
> //
> //
>
**********************************************************************
>
> #include <OB/MarshalStubImpl.h>
> #include <OB/DirectStubImpl.h>
> #include <OB/Upcall.h>
> #include <OB/ValueBase.h>
> #include <OB/ORBInstance.h>
> #include <OB/InitialServiceManager.h>
> #include <OB/Logger.h>
> #include <OB/Properties.h>
> #include <OB/RefCounted.h>
> #include <OB/OAInterface.h>
> #include <OB/PIManager.h>
>
> #include <Server.h>
> #include <POAManager_impl.h>
> #include <POA_impl.h>
> #include <POAOAInterface_impl.h>
> #include <POACurrent_impl.h>
> #include <BootManager_impl.h>
> #include <POALocator.h>
>
> using namespace CORBA;
> using namespace OB;
>
> //
>
----------------------------------------------------------------------
> // POAManager_impl private member implementation
> //
>
----------------------------------------------------------------------
>
> //
> // If we're in the context of a method invocation
> returns true, false
> // otherwise.
> //
> bool
> OBPortableServer::POAManager_impl::isInORBUpcall()
> {
> //
> // Find out whether we're inside a method
> invocation
> //
> bool inInvocation = false;
> try
> {
> InitialServiceManager_var initialServiceManager =
> orbInstance_ -> getInitialServiceManager();
> CORBA::Object_var o = initialServiceManager ->
> resolveInitialReferences("POACurrent");
> PortableServer::Current_impl* current =
>
> dynamic_cast<PortableServer::Current_impl*>(o.in());
>
> inInvocation = (current != 0 && current ->
> _OB_inUpcall());
> if(inInvocation)
> {
> //
> // Check whether or not the request is
> dispatched in this
> // POAManager's ORB or another ORB.
> //
> PortableServer::POA_var poa = current ->
> get_POA();
> POA_impl* p =
> dynamic_cast<POA_impl*>(poa.in());
> inInvocation = (p -> _OB_ORBInstance() ==
> orbInstance_.in());
> }
> }
> catch(const ORB::InvalidName&)
> {
> }
>
> return inInvocation;
> }
>
> //
> // Wait for all pending requests to complete
> //
> void
>
OBPortableServer::POAManager_impl::waitPendingRequests()
> throw(SystemException)
> {
> //
> // Wait for all pending requests from all POAs
> to complete
> //
> POASyncHashTable::Enumerator keys =
> poas_.keys();
> for(ULong i = 0; i < keys.length(); ++i)
> {
> PortableServer::POA_var poa;
> if(poas_.get(keys[i], poa))
> {
> POA_impl* poaImpl =
> dynamic_cast<POA_impl*>(poa.in());
> poaImpl -> _OB_waitPendingRequests();
> }
> }
> }
>
> //
> // Etherealize each of the servants associated with
> each POA
> //
> void
> OBPortableServer::POAManager_impl::etherealizePOAs()
> {
> try
> {
> InitialServiceManager_var initialServiceManager =
> orbInstance_ -> getInitialServiceManager();
> CORBA::Object_var o = initialServiceManager ->
> resolveInitialReferences("RootPOA");
> OBPortableServer::POA_impl* rootPOA =
>
> dynamic_cast<OBPortableServer::POA_impl*>(o.in());
> assert(rootPOA);
>
> //
> // Etherealize recursively from the RootPOA and
> only POAs
> // associated to this POAManager.
> //
> rootPOA -> _OB_etherealize(this);
> }
> catch(const ORB::InvalidName&)
> {
> assert(false);
> }
> }
>
> //
>
----------------------------------------------------------------------
> // POAManager_impl constructor and destructor
> //
>
----------------------------------------------------------------------
>
> OBPortableServer::POAManager_impl::POAManager_impl(
> ORBInstance_ptr orbInstance,
> POALocator* poaLocator,
> const char* id,
> char* adapterManagerId,
> const OCI::AcceptorSeq& acceptors,
> const CORBA::PolicyList& policies)
> throw(CORBA::PolicyError,
> CORBA::SystemException)
> :
> orbInstance_(ORBInstance::_duplicate(orbInstance)),
> state_(PortableServer::POAManager::HOLDING),
> acceptors_(acceptors),
> id_(id),
> adapterManagerId_(adapterManagerId),
> bootManager_(orbInstance -> getBootManager()),
> poaLocator_(poaLocator)
> {
> try
> {
> //
> // Set the server id
> //
> serverId_ = orbInstance_ -> getServerId();
> if(strlen(serverId_) == 0)
> serverId_ = string_dup("_RootPOA");
>
> //
> // Create the OAInterface
> //
> oaInterface_ = new POAOAInterface_impl(this,
> orbInstance_);
>
> //
> // Construct the root name of the property
> key for this POAManager
> // instance
> //
> String_var rootKey =
> string_dup("ooc.orb.poamanager.");
> rootKey += id_;
> rootKey += ".";
> ULong rootKeyLen = strlen(rootKey);
>
> //
> // Get the Logger
> //
> Logger_var logger = orbInstance_ ->
> getLogger();
>
> //
>
=== message truncated ===> //
>
**********************************************************************
> //
> // Copyright (c) 2004
> // IONA Technologies, Inc.
> // Waltham, MA, USA
> //
> // All Rights Reserved
> //
> //
>
**********************************************************************
>
> #include <OB/TypeCode.h>
> #include <OB/Principal.h>
> #include <OB/MarshalStubImpl.h>
> #include <OB/ValueBase.h>
> #include <OB/AbstractBase.h>
> #include <OB/Stream.h>
> #include <OB/ORBInstance.h>
> #include <OB/ValueFactoryManager.h>
> #include <OB/IFR1.h>
> #include <OB/RefCounted.h>
> #include <OB/ValueReaderWriter.h>
> #include <OB/TypeCodeCache.h>
>
> #include <CodeSetDatabase.h>
> #include <CodeConverter.h>
> #include <Custom_impl.h>
>
> #include <stdio.h>
> #include <stdlib.h>
>
> using namespace CORBA;
> using namespace OB;
>
> //
>
----------------------------------------------------------------------
> // External, non-inline duplicate/release for
> templates
> //
>
----------------------------------------------------------------------
>
> void
> OBDuplicate(OB::InputStream_ptr p)
> {
> if(p)
> p -> _OB_incRef();
> }
>
> void
> OBRelease(OB::InputStream_ptr p)
> {
> if(p)
> p -> _OB_decRef();
> }
>
> void
> OBDuplicate(OB::OutputStream_ptr p)
> {
> if(p)
> p -> _OB_incRef();
> }
>
> void
> OBRelease(OB::OutputStream_ptr p)
> {
> if(p)
> p -> _OB_decRef();
> }
>
> //
>
----------------------------------------------------------------------
> // OutputStreamImpl private and protected member
> implementations
> //
>
----------------------------------------------------------------------
>
> ULong
> OutputStreamImpl::writeGap()
> {
> addCapacity(4, 4);
> ULong result = buf_ -> cur_ - buf_ -> data_;
> buf_ -> cur_ += 4;
> return result;
> }
>
> void
> OutputStreamImpl::writeLength(ULong start)
> {
> ULong length = buf_ -> cur_ - buf_ -> data_ -
> (start + 4);
> Octet* p = buf_ -> data_ + start;
> *((ULong*)p) = length;
> }
>
> void
> OutputStreamImpl::writeTypeCodeImpl(TypeCode_ptr tc,
> WriteTCHistory& history)
> {
> if(tc -> recId_.in())
> {
> if(is_nil(tc -> recType_))
> throw
> BAD_TYPECODE(MinorIncompleteTypeCode, COMPLETED_NO);
> writeTypeCodeImpl(tc -> recType_, history);
> return;
> }
>
> //
> // For performance reasons, handle the primitive
> TypeCodes first
> //
> switch(tc -> kind())
> {
> case tk_null:
> case tk_void:
> case tk_short:
> case tk_long:
> case tk_longlong:
> case tk_ushort:
> case tk_ulong:
> case tk_ulonglong:
> case tk_float:
> case tk_double:
> case tk_longdouble:
> case tk_boolean:
> case tk_char:
> case tk_wchar:
> case tk_octet:
> case tk_any:
> case tk_TypeCode:
> case tk_Principal:
> write_ulong((ULong)tc -> kind());
> return;
>
> default:
> break;
> }
>
> Long indirectionPos;
> if(history.get(tc, indirectionPos))
> {
> //
> // Write an indirection since the TypeCode has
> already been
> // marshaled in the enclosing TypeCode.
> //
> write_ulong(0xffffffff);
> Long offs = indirectionPos - (Long)(buf_ ->
> cur_ - buf_ -> data_);
> write_long(offs);
> }
> else
> {
> write_ulong((ULong)tc -> kind());
> Long oldPos = (Long)(buf_ -> cur_ - buf_ ->
> data_ - 4);
>
> switch(tc -> kind())
> {
> case tk_fixed:
> {
> history.put(tc, oldPos);
>
> write_ushort(tc -> fixedDigits_);
> write_short(tc -> fixedScale_);
>
> break;
> }
>
> case tk_local_interface:
> case tk_objref:
> case tk_abstract_interface:
> case tk_native:
> {
> history.put(tc, oldPos);
>
> ULong start = writeGap();
> _OB_writeEndian();
> write_string(tc -> id_);
> write_string(tc -> name_);
> writeLength(start);
>
> break;
> }
>
> case tk_struct:
> case tk_except:
> {
> history.put(tc, oldPos);
>
> ULong i;
>
> ULong start = writeGap();
> _OB_writeEndian();
> write_string(tc -> id_);
> write_string(tc -> name_);
> const ULong nMembers = tc ->
> memberNames_.length();
> write_ulong(nMembers);
> for(i = 0; i < nMembers; ++i)
>
=== message truncated ===
_______________________________________________________
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html