v_repExtRos not working on OS X and Windows

Report crashes, strange behaviour, or apparent bugs
Post Reply
Posts: 681
Joined: 09 Sep 2013, 19:28

v_repExtRos not working on OS X and Windows

Post by fferri »

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 :-)


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)
+#elif defined (__APPLE__)
+	temp+="/libv_rep.dylib";
+#endif /* __linux || __APPLE__ */

 	// 3. Load the V-REP library:

Site Admin
Posts: 8223
Joined: 14 Dec 2012, 00:25

Re: v_repExtRos not working on OS X and Windows

Post by coppelia »

Thanks again Federico,

you are right. The plugin was actually initially not meant for a different platform that Linux ;)


Post Reply