- This topic has 3 replies, 2 voices, and was last updated 4 years, 7 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] Failed to load plugins when debugging
Tagged: 64_bits, Plugin_SoftRobots, SOFA_1912, Windows_10
I’ve successfully built the debug version of sofa. But when I tried to run runSofa_d.exe
, it can’t load plugins as below
After debugging, I found that the suffix is not got correctly.
// PluginManager.h, line 130
std::string PluginManager::getDefaultSuffix()
{
#ifdef SOFA_LIBSUFFIX
return sofa_tostring(SOFA_LIBSUFFIX);
#else
return std::string();
#endif
}
And the SOFA_LIBSUFFIX
is not defined because
# D:\sofa\src\SofaKernel\modules\SofaHelper\CMakeLists.txt line 339
set_property(SOURCE system/PluginManager.cpp APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "SOFA_LIBSUFFIX=_d" )
doesn’t work.
The path of source file
(system/PluginManager.cp) in set_property
is not complete.
The correct method is :
# D:\sofa\src\SofaKernel\modules\SofaHelper\CMakeLists.txt line 339
set_property(SOURCE ${SRC_ROOT}/system/PluginManager.cpp APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "SOFA_LIBSUFFIX=_d" )
Then, SOFA_LIBSUFFIX
would be defined as -d
.
But what is strange is that only one plugin CImgPlugin_d.dll
can’t be loaded. Others can be loaded without error. The CImgPlugin_d.dll
is generated in the Debug
directory.
Thanks.
I close your topic then.
NB: it has recently been decided that a new stable branch would now derive from the last stable release (v20.06) and include all fixes and patches, in order for you to work in best conditions. Stay tuned.
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.