## Missing header file in OSX 10.9 for building plugin

Report crashes, strange behaviour, or apparent bugs
Pouya
Posts: 12
Joined: 15 Feb 2013, 11:19

### Missing header file in OSX 10.9 for building plugin

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
Posts: 7597
Joined: 14 Dec 2012, 00:25

### Re: Missing header file in OSX 10.9 for building plugin

Thanks for mentioning this!

Cheers

Pouya
Posts: 12
Joined: 15 Feb 2013, 11:19

### Re: Missing header file in OSX 10.9 for building plugin

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

### Re: Missing header file in OSX 10.9 for building plugin

It is still missing from the latest source files VREP 3.2.1 (both meshCalculationPlugin and pathPlanningPlugin).