The latest TWS API 10.18.02 ships with a makefile for C++ on Linux that contains rules for static and shared library client client compilations and uses the libraries supplied by IBKR. It also contains various command line definitions for g++ you should model your build environment around:
samples/Cpp/TestCppClient/Makefile.linux
I don't get copied on IBKR Engineering internals, but I guess the Decimal type for instrument sizes was introduced for crypto support. Standard floating point math cannot even calculate 1.123 + 1.456 correctly as 2.579 so you might be off by a small fortune when trading crypto instruments using floating point math of any size.
Decimal data types provide fixed point math where these calculations do get exact results. IBKR has defined math contexts that support correct fixed point calculations of up to 16 digits to the right of the decimal separator (dot or comma depending on where you live).
´³¨¹°ù²µ±ð²Ô