I created a VS2017 solution with 2 projects: Client and Manager following Request-Reply pattern and the 2 projects work well just until another project is added, called Services. All 3 of them are executable (.exe)
The Services is created for another Request-Reply communication with the Manager. Just when Services.hpp is written with:
#include "ndds_cpp.h"
The following build error appeared:
C2440 'initializing': cannot convert from 'initializer list' to 'DDS_LoggingQosPolicy' Services CorePolicyAdapter.hpp 165
It looks like you're including both the traditional C++ API (ndds_cpp.h) and the modern C++ API (CorePolicyAdapter.hpp). These two cannot be included in the same translation unit.
More info:
https://community.rti.com/kb/how-do-i-use-traditional-c-and-modern-c-apis-same-application
https://community.rti.com/kb/differences-between-modern-and-traditional-c-apis
Thank you alexc, you are right. After changing to <dds/dds.hpp> as the link suggested, things are good to go now. You saved my day, man :)