Report crashes, strange behaviour, or apparent bugs
-
Pouya
- Posts: 12
- Joined: 15 Feb 2013, 11:19
Post
by Pouya » 25 Jun 2014, 10:17
Hello. It seems on OS X Mavericks, v_repExtPluginSkeleton.cpp fails to build out box because of
Code: Select all
error: use of undeclared identifier 'getcwd'
This
maybe is due to the fact that in Xcode 5, header files are no longer located in /usr but in
Code: Select all
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/v1
Solution:
It is sufficient to include <unistd.h> and rebuild.
-
coppelia
- Site Admin
- Posts: 7441
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 25 Jun 2014, 15:46
Thanks for mentioning this!
Cheers
-
Pouya
- Posts: 12
- Joined: 15 Feb 2013, 11:19
Post
by Pouya » 26 Jun 2014, 09:56
For future readers:
In the past few days I went through an unfair amount of pain with building plugins in Mavericks and here I share some experiences so others wont suffer.
If you are going to make platform-independent plugin, by way of using gcc, please consider few notes. First, gcc that comes with XCode 5 on mavericks, is only a front end and at the backend, it is still CLang. If you want to use gcc, you need to build it by yourself (e.g. via brew).
Secondly, until OS X 10.8 the default binaries for std library was libstdc++ but since mavericks it is changed to libc++. You need to explicitly tell to gcc to use the former or, simply use g++ instead.
I also suggest V-Rep development team to modify the Makefile and Skeleton related to c++ plugins as its current state will fail on either linux or mac.
-
enddl22
- Posts: 5
- Joined: 05 May 2015, 13:05
Post
by enddl22 » 14 Jul 2015, 06:34
It is still missing from the latest source files VREP 3.2.1 (both meshCalculationPlugin and pathPlanningPlugin).
After adding the header mentioned, everything is fine.
Cheers,