Avoiding symbol clashes
An extended vcpkg CI run with paraview using vtk using gdal using poppler run into linker errors due Parser::~Parser
being defined both in Paraview and in Poppler. This is just one class name to be concerned about. There is also Array, Dict, etc. What is the preferred solution:
-
Moving the classes to a namespace, e.g.
Poppler
. -
Adding a prefix similar to
GooString
, i.e.Goo...
. -
Adjust as needed vs. moving all private classes vs. moving all classes.
This will change ABI, and it won't be entirely source compatible. (It is possible to import the classes into the global namespace using using ...
, but at least forward declarations must be changed. Macros might provide additional help, a la QT_BEGIN_NAMESPACE.)