-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
return false;
}
-CppComponent * CppContainer::createComponentInstance(const std::string & componentName, int /* studyID */)
+CppComponent * CppContainer::createComponentInstance(const std::string & componentName)
{
DEBTRACE("CppContainer::createComponentInstance");
if (_trueCont)
}
#ifndef WIN32
+#ifdef __APPLE__
+ std::string impl_name = std::string ("lib") + aCompName + std::string("Local.dylib");
+#else
std::string impl_name = std::string ("lib") + aCompName + std::string("Local.so");
+#endif
if(sprefix != "")
impl_name = sprefix + std::string("/") + impl_name;
#else
#if defined( WIN32 )
HMODULE handle;
- handle = dlopen( impl_name.c_str() ) ;
+#if defined(UNICODE)
+ size_t length = strlen(impl_name.c_str()) + sizeof(char);
+ wchar_t* aPath = new wchar_t[length + 1];
+ memset(aPath, '\0', length);
+ mbstowcs(aPath, impl_name.c_str(), length);
+#else
+ const char* aPath = fullLibName.c_str();
+#endif
+ handle = dlopen( aPath ) ;
#else
void* handle;
handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;