Skip to content

Commit 16b37e9

Browse files
Merge pull request #60 from ros/ros2_debug_library_suffix
[ros2] library suffix hack
2 parents adcb526 + 6879603 commit 16b37e9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/class_loader.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,17 @@ std::string systemLibraryPrefix()
5656

5757
std::string systemLibrarySuffix()
5858
{
59-
#if !defined(WIN32)
60-
return Poco::SharedLibrary::suffix();
61-
#else
62-
// Return just .dll , as Poco::SharedLibrary::suffix() will return d.dll in debug mode.
63-
// This isn't common for our usecase (instead debug libraries are placed in a `Debug` folder).
59+
// Poco should be compiled with `#define POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX`
60+
// to automatically remove the trailing `d` from the shared library suffix
61+
// return Poco::SharedLibrary::suffix();
62+
#ifdef __linux__
63+
return ".so";
64+
#elif __APPLE__
65+
return ".dylib";
66+
#elif _WIN32
6467
return ".dll";
68+
#else
69+
return Poco::SharedLibrary::suffix();
6570
#endif
6671
}
6772

0 commit comments

Comments
 (0)