C++ project settings
This page describes the necessary steps to properly compile the C++ part of the Soundgates project.
The project uses the following libraries, which are all included in the Libraries subproject, with both arm and x86_64 versions:
- alsa - Interface to play sound (only arm version included)
- boost 1.54 - Different convenience functions
- libav - Playing sound files
- lo - OSC library
- reconos - Interface to include hardware threads (only arm version included)
- xmlrpc-c - XML RPC library. Is not yet used productively
- mongo - A C driver for the mongodb, which is used when sound component logging is enabled
If you use Eclipse CDT as a development environment, the following project settings are already included in the repository and can be imported.
Synthesizer
These settings apply for the Synthesizer project, which will produce the executable that will finally run patches.
## C++ compiler settings
### Symbol definitions
* -DBOOST_LOG_DYN_LINK
* -DAPPLICATION_CONTEXT
Required for the Boost logging.
* -DZYNQ
Only when compiling for the zynq platform
Include paths
-isystem"<path_to>/soundgates/software/zynq/Libraries/x86_64/include"
Use -isystem instead of -I, otherwise Boost will produce a lot of notification output (or just use both -I and -isystem to be on the safe side)
Miscellaneous
-c
Link later
C++ Linker settings
Dynamically linked libraries
-
-L"<path_to>/pg_soundgates/software/zynq/Libraries/x86_64/lib" -
-ldl -lmongoc -llo -lpthread -lboost_filesystem -lboost_thread -lboost_program_options -lboost_regex -lboost_log -lboost_system -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok
Miscellaneous
-rdynamic
The rdynamic flag is required since singletons are used that need to refer to the same object in both the main Synthesizer program as well as in the shared Sound Component libraries.
libsynthesizercore
A part of synthesizer framework needs to be exposed to sound components. The makefile located at Synthesizer/makefiles/core.mk will build a folder libsynthesizercore, which needs to be copied to the SoundComponents project to compile components there
The core.mk containts definitions for CC, CFLAGS and LDFLAGS, which need to be exchanged depending on whether the lib should be compiled for arm or x86_64.
Building the core happens from the command line via make -f core.mk
Sound Components
Each sound component is compiled as a shared library. Sound components include the common makefile SoundComponents/makefiles/common.mk which sets the necessary flags. The sound components can then either be build one by one, or using the top level Makefile which descends into each specified subfolder.
Building happens on the command line with make target=x86_64|arm debugging=on|off all.
Debugging will turn optimization of the components off and debugging symbols on and target specifies the target platform.