- Create a folder called fetpapiEnv.
- In this folder create the three following folders
- build
- fetpapi (Git clone this repository into this folder "fetpapi". You should then have a path fetpapiEnv/fetpapi/src)
- dependencies
- The following compilers are known to work (used in CI)
- gcc from version 4.8
- visual studio from version 2019
Download (build and install if necessary) third party libraries:
- BOOST : All versions from version 1.66 should be ok but you may experience some min/max build issues using version 1.72 or 1.73.
- AVRO : https://avro.apache.org/releases.html#Download (starting from version 1.9.0 except 1.11.1, build it with the above boost library.)
- (OPTIONALLY) OpenSSL : version 1.1 is known to work.
- (OPTIONALLY) FESAPI : All versions from version 2.7.0.0 should be ok.
FETPAPI uses cmake as its build tool. A 3.12 version or later of cmake is required https://cmake.org/download/. We also recommend using cmake-gui (already included in the bin folder of the binary releases of cmake) which provides a graphical user interface on top of cmake. If you want to use cmake in command line, you would find example in Github Actions file. Follow the below instructions :
- yourPath/fetpapiEnv/fetpapi defines where is the source code folder
- yourPath/fetpapiEnv/build/theNameYouWant defines where to build the binaries
- Click on "Configure" button and select your favorite compiler : it will raise several errors.
- give real path and files to the following cmake variables:
- BOOST
- Boost_INCLUDE_DIR : the directory where you can find the directory named "boost" which contain all BOOST headers
- AVRO (using our own cmake find module)
- (ONLY IF NOT AUTOMATICALLY FOUND) AVRO_ROOT : The path to the folder containing include and lib folders of AVRO
- BOOST
- Click again on "Configure" button. You should no more have errors so you can now click on "Generate" button.
- You can now build your solution with your favorite compiler (and linker) using the generated solution in yourPath/fetpapiEnv/build/theNameYouWant
- OPTIONALLY, you can also set the variables WITH_DOTNET_WRAPPING, WITH_PYTHON_WRAPPING to true if you want to also generate wrappers on top of FETPAPI for these two other programming languages. Don't forget to click again on "Configure" button once you changed the value of these two variables.
- You will then have to also provide the path to the SWIG (version 3 as a mininum version) executable http://swig.org/download.html in the SWIG_EXECUTABLE variable (and click again on "Configure" button)
- you will find the wrappers in fetpapi/cs/src (fetpapi/cs also contains a VS2015 project for the wrappers) or fetpapi/python/src
- OPTIONALLY, for SSL support, please enable the WITH_ETP_SSL variable and set the following variables :
- OPENSSL_INCLUDE_DIR : the OpenSSL include directory
- LIB_EAY_RELEASE : the OpenSSL crypto library you want to link with.
- SSL_EAY_RELEASE : the OpenSSL ssl library you want to link with.
- OPTIONALLY, for FESAPI (v2.7.0.0 as a minimal version) support (see here for documentation on how to build fesapi), please enable the WITH_FESAPI variable and usually set the following variable :
- FESAPI_ROOT : The path to the folder containing include and lib folders of FESAPI (using our own cmake find module)
Remark : you can choose where FETPAPI will be installed (using "make install" on Linux or by generating the "INSTALL" project on Visual Studio) by setting the cmake variable called CMAKE_INSTALL_PREFIX
As a first way to start, we advise people to look at examples provided with FESAPI. Please give a look at:
- C++ : in example/withFesapi/etpClient.cpp or in example/withoutFesapi/etpClient.cpp
- C# : client (here) : FetpapiClient.cs will be generated by cmake configuration when WITH_DOTNET_WRAPPING is ON, the source file is initially located in (cmake/Program.cs)
- Java (JDK 1.5 and later) : in java/src/com/f2i_consulting/example/FetpapiClientUsingFesapi.java (FetpapiClientUsingFesapi.java will be generated by cmake configuration when WITH_JAVA_WRAPPING is ON, the source file is initially located in cmake/FetpapiClientUsingFesapi.java)
- Python3 (no support for Python2) : in (python/example/example.py) (please follow instructions in the documentation header of this example python file)
You can also find Doxygen generated documentation here
This software was developed with :
- the date library from Howard Hinnant
This software was tested with :