Touch input doubly so, because it never matches the fb's orientation (it *generally* matches the actual physical native rotation of the panel, not that you have an easy way to devise that anyway), the translation can be a bit wonky to deal with because of fb rotation quirks on most devices, and the actual protocol is also quirky and device-specific.
Plato should have the most concise implementation of that in a multi-platform way. Cross-ref w/ KOReader for input, and FBInk for fb rotation quirks.
(Since you mentioned C++, the nickel TC is the only way for you to be able to link to the STL dynamically. Newer GCC means newer libstdc++, means you need -static-libstdc++ to ship working binaries

. As far as Qt is concerned, someone asked about that not two days ago, c.f., a few threads around this one: TL;DR: can't use the stock QPA as-is, so, PITA again).