Table of Contents |
---|
...
Key notesKeynotes
GCC C++ ABI is forward compatible from version 3.4.
GCC 5.1 introduced Dual ABI to support C++11 requirements for
std::string
andstd::list
(macro_GLI
BCXX_USE_CXX11_ABI
specifies which one to use).Since GCC 5.1 C++11 ABI is compatible with GCC 5.x and above where C++ standard is 2011 and newer.
GCC 6.1 has full support for the C++14 standard, which was published in 2014. This mode is the default in GCC 6.1 and above; it can be explicitly selected with the
-std=c++14.
The previous naming schema was ambiguous because gcc GCC 5 and later can be used to build binaries with C++98 ABI.
Since the release of 2.26.0 FIX Antenna binaries have following naming convention for Linux:
Binary | Old binary naming convention | C++ ABI | Target OS | Target Compiler |
---|---|---|---|---|
libV12_rh6.so | libV12-centos-6.5-gcc44-MD-x64.so | C++ 98 | RHEL6/CentOS6 |
|
libV12_rh6_cxx11.so | libV12-centos-6.7-gcc52-MD-x64.so libV12-centos-6.10-gcc52-MD-x64.so libV12-centos-6.9-gcc63-MD-x64.so libV12-centos-6.10-gcc63-MD-x64.so | C++ 11 | RHEL6/CentOS6 | GCC 5.2 and higher with Note: GCC 5.2 and higher should be build built and installed from sources , because GCC from devtoolset uses only C++98 ABI. Use LD version 2.27 and higher with C++11 ABI to avoid linking problems. |
libV12_rh7.so | libV12-centos-7.5.1804-gcc48-MD-x64.so libV12-centos-7.5.1804-gcc49-MD-x64.so | C++ 98 | RHEL7/CentOS7 |
Note: GCC should be installed from RHEL/CentOS repository or developer toolset. Do not use GCC from devtoolset dev toolset with new ABI, i.e. with parameter |
libV12_rh7_cxx11.so | libV12-centos-7.5.1804-gcc52-MD-x64.so | C++ 11 | RHEL7/CentOS7 | GCC 5.2 and higher with Note: GCC 5.2 and higher should be build built and installed from sources , because GCC from devtoolset uses only C++98 ABI. Use LD version 2.27 and higher with C++11 ABI to avoid linking problems. |
libV12_ubuntu1604_cxx11.so | libV12-ubuntu-16.04.5-lts-gcc61-MD-x64.so | C++ 11 | Ubuntu 16.04 | GCC 5.2 and higher with Note: GCC 5.2 and higher should be installed from the Ubuntu repository. Use LD version 2.27 and higher with C++11 ABI to avoid linking problems. |
How to use FIX Antenna with GCC
Preparation step: a set symlink to a suitable binary for your platform. Use ${FIX_ANTENNA_LOCATION}/samples/v12-linker.sh helper for that purpose or use ln from binutils.
...
Go to the FIX Message Listener directory and compile it with the following parameters:
Code Block | ||
---|---|---|
| ||
cd Listener g++ -D_LINUX -fPIC -MMD -MF ./debug_obj/FIXApp.d -I../../../headers -ggdb -D_DEBUG -c FIXApp.cpp -o debug_obj/FIXApp.o g++ -D_LINUX -fPIC -MMD -MF ./debug_obj/Listener.d -I../../../headers -ggdb -D_DEBUG -c Listener.cpp -o debug_obj/Listener.o g++ -D_LINUX -fPIC -MMD -MF ./debug_obj/SessionConnector.d -I../../../headers -ggdb -D_DEBUG -c SessionConnector.cpp -o debug_obj/SessionConnector.o |
...
Code Block | ||
---|---|---|
| ||
g++ -L../../../lib release_obj/FIXApp.o release_obj/Listener.o release_obj/SessionConnector.o \ -o Listener \ -lrt -lV12 |
How to build project with FIX Antenna using the Make utility
First, create a Makefile with the following content:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# # Makefile # # $Id: Makefile,v 1.3 2007/12/06 15:51:27 sam Exp $ ############################################ # global and compiler related settings ROOTDIR:=$(shell pwd) CFLAGS+=-ggdb CXXFLAGS+=-D_LINUX \ -Wall \ -Wextra \ -Winit-self \ -Wmissing-include-dirs \ -Wno-parentheses \ -pedantic \ -Wno-long-long \ -Wno-unused-parameter \ -Wredundant-decls \ -Wnon-virtual-dtor \ -Wshadow \ -Woverloaded-virtual LIBS+=-lV12 DFLAGS=-MMD -MF $$(addprefix $$(OBJDIR)/,$$(notdir $$(<:%.cpp=%.d))) SHROFLAGS=-fPIC SOFLAGS=-shared DEBUG_FLAGS=-ggdb -D_DEBUG OPTIM_FLAGS=-O3 -DNDEBUG ############################################ #try to guess platform ############################################ # more beautiful output #MAKEFLAGS+=--no-print-directory Q=@ QCC:=@echo "(C) $$(notdir $$<)" ; $(CC) QCXX:=@echo "(C++) $$(notdir $$<)" ; $(CXX) QLNK:=@echo "(LINK) $$(notdir $$<)" ; $(CXX) QAR:=@echo "(AR) $$(notdir $$<)" ; $(AR) QMAKE:=@echo "(MAKE) $@" ; $(MAKE) ############################################ export SUBDIRS = \ Listener\ Sender all debug clean:: @if [ -x ../v12-linker.sh ]; then ../v12-linker.sh --use-cxx11-abi=`../check_abi.sh` --searchpath=../../lib; fi; \ for i in $(SUBDIRS); do \ ( cd $$i && make -f GNUmakefile.debug $@) || exit 1; \ done release clean:: @if [ -x ../v12-linker.sh ]; then ../v12-linker.sh --use-cxx11-abi=`../check_abi.sh` --searchpath=../../lib; fi; \ for i in $(SUBDIRS); do \ ( cd $$i && make -f GNUmakefile.release $@ ) || exit 1; \ done |
...