Help for beginners Unix - mac OS X


Product: [Jumping Race]
SDK version: [3]
Use of libARController: [YES] (Only for ARSDK)
SDK platform: [Unix]

I’m absolut beginner, and I#m trying to make my own code for my project.
I have followed the istructions and I be able to run the Samples/Unix/JumpingSumoSample in my computer.
Now I will love to open the JumpingSumoSample in XCode to modificate it as I need.

… and I can’t do it :frowning: I do not know how :frowning:

could somone explain me how to do it?
Thanks in advance!


I guess you can go in “sdk”/packages/Samples/Unix/JumpingSumoSample, (“sdk” being the place where you set up your repository for the sdk) then right click on the .c file you want to modify, then open with… xcode.
Hope it helps




The “Unix” samples are based on the Alchemy build system (the one used by the rest of the SDK), and thus can not be opened as Xcode projects. You can obviously open the .c files in Xcode, but you won’t be able to build the sample from Xcode without a little work.

I wrote here an explanation on how to create your own samples from the SDK. The second part of my message (i.e. without Alchemy) could surely be used to configure an Xcode project from which you can use the SDK libraries. Another way would be to use the iOS sample project “build settings” as an example, but you’ll need to adjust every path to point to the unix output directory instead of the iOS one.

You should then be able to copy & modify the JumpingSumoSample source code in your Xcode project :wink:



But it will be not any XCode project …?


@Nicolas thank you!
it looks great, I will try it ASAP and I let you know the results



You asked how to open the file with xcode, not how to create an xcode project using the sample files.


@mixeur5 Yes, you are right! The question was not properly formulated … Sorry!
I would like to open the sample as a compilable XCode project …


@Nicolas, I’m trying to follow your istructions … and I have a lot of questions.

Instructions for iOS at Parrots Developers site:
In Header Search Paths, add a Any iOS Simulator SDK and a Any iOS SDK architecture (both for Debug and Release).
Then fill these architectures with:

For any simulator SDK: PATH_TO_THE_UNZIPPED_FOLDER/iOS-iphonesimulator/staging/usr/include
For any iOS SDK: PATH_TO_THE_UNZIPPED_FOLDER/iOS-iphoneos/staging/usr/include

Now, for Unix, what do I need to add in Header Search Paths:

Any Architecture | Any SDK
Any iOS Simulator SDK
Any macOS SDK

The PATH is:

The same question for Library Search Paths : What should I add?
The PATH is:

With the Other Linker Flags it’s clear :slight_smile:

But I do not understand how to implement the last point:
When running your application, add the /out/arsdk-native/staging/usr/lib path to the LD_LIBRARY_PATH environment variable (e.g. LD_LIBRARY_PATH=/out/arsdk-native/staging/usr/lib ./your_app)

Anyway, when I open the sample for IOS, that is an Xcode project, I can see that there are a lot of Build Settings, and I wonder if I need to copy all of them for the Unix sample or I must to change them?

It could be great to have a sample for Unix in Xcode, like the ones for iOS :slight_smile:

I appreciate any help!



Not an Xcode expert, but I guess that you’ll only have to add the following informations:

  • Header Search Path -> Any macOS SDK with value <SDK>/out/arsdk-native/staging/usr/include
  • Library Search Path with value <SDK>/out/arsdk-native/staging/usr/lib
  • Other Linker Flags with the same value as in the iOS sample

This should be enough to build & run from Xcode.

The LD_LIBRARY_PATH part should be handled automatically by Xcode, nothing to do here.

Note: The <SDK> in the path refers to a “relative path to the root of the SDK, from your sample”, so if you create your Xcode project in packages/Samples/Unix/, replace <SDK> with ../../...



Thank you alot for your help!!!
Now I be able to create an Xcode project for the Unix Sample, to compile it and build the application from Xcode and the app runs properly.
Now I need to understand it and begin to change it :wink:

But first I will post how I set up the path for the Xcode project:

in Other Linker Flags add:
-larcommands -larcontroller -lardiscoverywithouteacc -larnetwork -larnetworkal -larsal -larstream -larstream2 -larmavlink -ljson -larmedia -larutils -lcurl -lardatatransfer -lmux -lpomp -lcrypto -lssl -lz -lncurses

in Header Search Path add Any macOS SDK and set to

in Library Search Path add Any macOS SDK and set to

set User Header Search Path to

and set Always Search User Path to

I did also the follow two steps, but I discover later that they weren’t needed:
in Product/Scheme/Edit Scheme
Run/ Environment Variables

add INCLUDE and set to
<SDK>/out/arsdk-native/staging/usr/include ./your_app

and add LD_LIBRARY_PATH and set to
<SDK>/out/arsdk-native/staging/usr/lib ./your_app

The last two ones were not needed!!!

Xcode build the application without error and the application RUNS :slight_smile: I could see the video and control the Parrot from my Keyboard

Any ways, the .app runs properly but when compiles Xcode gives the follow message … I don’t know why?

Build Succeeded:

[INF] myTest | 15:38:04:973 | main:161 - -- myTest --
[ERR] myTest | 15:38:04:974 | main:173 - Missing mplayer, you will not see the video. Please install mplayer and xterm.
Error opening terminal: unknown.
Program ended with exit code: 1

Have a nice day!