diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9268e2030cd98554cd509bed1b9665b60e279a4f..349a9ac21827a4b676794b8d8eb197412f2d151f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -23,6 +23,7 @@ ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
 
 ADD_DEFINITIONS(-DTESTS_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data")
 ADD_DEFINITIONS(-DTESTS_PLUGINDIR="${LIBRARY_OUTPUT_PATH}")
+ADD_DEFINITIONS(-DTESTS_DYNLIBSUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}")
 
 # DYNAMIC_GRAPH_TEST(NAME)
 # ------------------------
diff --git a/tests/interpreter.cpp b/tests/interpreter.cpp
index 4d457f7912638c023a43cc6abb128b3f95e7029c..f05e1ec396426abd0c20068e734ecb1f9b92afed 100644
--- a/tests/interpreter.cpp
+++ b/tests/interpreter.cpp
@@ -181,21 +181,21 @@ BOOST_AUTO_TEST_CASE (cmd_loadPlugin)
   dynamicgraph::Interpreter shell (&pl);
 
   {
-    RUN_COMMAND ("loadPlugin", "shell-functions.so" " " TESTS_PLUGINDIR);
+    RUN_COMMAND ("loadPlugin", "shell-functions" TESTS_DYNLIBSUFFIX " " TESTS_PLUGINDIR);
     BOOST_CHECK (output.is_empty ());
   }
   {
-    RUN_COMMAND ("loadPlugin", "shell-procedure.so" " " TESTS_PLUGINDIR);
+    RUN_COMMAND ("loadPlugin", "shell-procedure" TESTS_DYNLIBSUFFIX " " TESTS_PLUGINDIR);
     BOOST_CHECK (output.is_empty ());
   }
 
   {
-    RUN_COMMAND ("unloadPlugin", TESTS_PLUGINDIR "/shell-procedure.so");
+    RUN_COMMAND ("unloadPlugin", TESTS_PLUGINDIR "/shell-procedure" TESTS_DYNLIBSUFFIX);
     BOOST_CHECK (output.is_empty ());
   }
 
   {
-    RUN_COMMAND ("unloadPlugin", TESTS_PLUGINDIR "/shell-functions.so");
+    RUN_COMMAND ("unloadPlugin", TESTS_PLUGINDIR "/shell-functions" TESTS_DYNLIBSUFFIX);
     BOOST_CHECK (output.is_empty ());
   }