I have developed a class library 'ceSerial.h' to use serial port (com port) on Windows, Mac and Linux.
This cross-platform 'ceSerial' class is written in C++ and we just need to include "ceSerial.h" in your source code in order to use it.
A simple example for C++ console program using the class is demonstrated.
The source code can be found at
https://github.com/yan9a/serial