To develop applications that run in the PolySync context you will need to set up a development environment with the libraries and tool-kits which PolySync depends on. This tutorial will show you how to set up an IDE development environment to build PolySync applications. Once configured the IDE will automatically expand structures and objects and link directly to the API documentation.
This tutorial assumes you're working on Ubuntu 14.04.3. If you haven't already done so you'll need to install PolySync on your system so that you can develop against the API's. If you choose not to follow the standard installation procedure then you'll need to manually install all dependencies found in the polysync/README.txt file.
Another assumption made is that you will be using the NetBeans IDE V8.1. The steps below can be used directly to set up a NetBeans IDE or you can use the same work flow to set up your IDE of choice.
The tutorial demonstrates how to include the directories containing PolySync header files so that the IDE can parse them to provide variable expansion and link to the documentation.
You'll be compiling the applications you build, so we're going to need a few build tools such as cmake and make. To install these tools use the following command in the terminal:
$ sudo apt-get update
$ sudo apt-get install build-essential git cmake
You can install NetBeans C/C++ by downloading the software from the NetBeans website.
Once the IDE is installed we can start the application and create a new project. To start the application hit the Home key on the keyboard then type NetBeans.
You can choose to create a new project or a project with existing source files. In this tutorial we select C/C++ Application for a new (empty) project.
Fill in the project name and desired location and select Finish.
On the left side-pane we have a list of open projects. At the top of the tree we have the new project polysync-example-application.
Right-click on the project name (polysync-example-application) and select Properties. You will see a matching window. Select Build->C Compiler.
In this window we will configure NetBeans to search in the necessary PolySync include directories. On the row that has Include Directories press the "..." button to open the file browser dialog.
Select Add and navigate the browser to the following two directories/folders:
Note that we are assuming that PolySync is installed to the default directory. To locate your installation of PolySync echo the PSYNC_HOME environment variable.
$ echo $PSYNC_HOME
Save the new configuration once the include directory paths are entered, and you will be ready to begin development!
A great next step towards accelerated development is to reference and modify the C & C++ examples that cover a wide variety of the provided PolySync APIs.