v_repExtRos not working on OS X and Windows
Posted: 26 Mar 2015, 17:59
After building v_repExtRos plugin for OS X, it fails to load, because it will look for libv_repExtRos.so, instead of libv_repExtRos.dylib.
I changed the part where it will unconditionally look for the ".so" file, with the corresponding part from v_repExtK3, which is macro based and will look for the correct library for the current platform. (See attached patch)
I don't know if there is ROS for Windows yet, but I just built ROS Indigo for OS X and now I'm playing with ROS, V-REP and v_repExtRos :-)
Patch:
I changed the part where it will unconditionally look for the ".so" file, with the corresponding part from v_repExtK3, which is macro based and will look for the correct library for the current platform. (See attached patch)
I don't know if there is ROS for Windows yet, but I just built ROS Indigo for OS X and now I'm playing with ROS, V-REP and v_repExtRos :-)
Patch:
Code: Select all
--- vrep_plugin/src/vrep_plugin.cpp.orig 2015-03-26 17:53:10.000000000 +0100
+++ vrep_plugin/src/vrep_plugin.cpp 2015-03-26 17:52:14.000000000 +0100
@@ -318,7 +318,14 @@ VREP_DLLEXPORT unsigned char v_repStart(
std::string currentDirAndPath(curDirAndFile);
// 2. Append the V-REP library's name:
std::string temp(currentDirAndPath);
+
+#ifdef _WIN32
+ temp+="\\v_rep.dll";
+#elif defined (__linux)
temp+="/libv_rep.so";
+#elif defined (__APPLE__)
+ temp+="/libv_rep.dylib";
+#endif /* __linux || __APPLE__ */
// 3. Load the V-REP library:
vrepLib=loadVrepLibrary(temp.c_str());