-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
if (_NS)
delete _NS;
- // _fab_thread not deleted beacause fab_thread is managed
+ // _fab_thread not deleted because fab_thread is managed
// by paco_fabrique_manager
}
MESSAGE("Try to load C++ component");
#ifndef WIN32
+#ifdef __APPLE__
+ std::string impl_name = string ("lib") + aCompName + string("Engine.dylib");
+#else
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
+#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
void* handle;
#ifndef WIN32
- handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;
+ handle = dlopen( impl_name.c_str() , RTLD_LAZY | RTLD_GLOBAL ) ;
#else
handle = dlopen( impl_name.c_str() , 0 ) ;
#endif
PyObject *result = PyObject_CallMethod(pyCont,
(char*)"import_component",
(char*)"s",componentName);
- std::string ret_p= PyString_AsString(result);
+ std::string ret_p= PyUnicode_AsUTF8(result);
Py_XDECREF(result);
Py_RELEASE_NEW_THREAD;
// On commence par créer le proxy
#ifndef WIN32
+#ifdef __APPLE__
+ std::string impl_name = string ("lib") + aCompName + string("Engine.dylib");
+#else
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
+#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
string instanceName = aCompName + "_inst_" + aNumI ;
string component_registerName = _containerName + "/" + instanceName;
- // --- Instanciate required CORBA object
+ // --- Instantiate required CORBA object
Container_proxy_impl_final::proxy_object * proxy = new Container_proxy_impl_final::proxy_object();
proxy->proxy_id = (component_proxy_factory) (_orb,
}
catch (...)
{
- INFOS( "Exception catched in Proxy creation" );
+ INFOS( "Exception caught in Proxy creation" );
return Engines::EngineComponent::_nil();
}