The DeclarativeSurface header file declarativesurface_p.h contains this disclaimer:
// W A R N I N G
// -------------
//
// This file is not part of the QtDataVisualization API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
From the above, it's pretty clear that the API currently has no supported way of accessing QML Surface3D from C++ - use this class at your own risk. There are no doxygen comments in that file, so user "interpretation" is required to figure out how the methods are to be used.
Note that DeclarativeSurface is in namespace QtDataVisualization, but since it's not "formally" a part the API, several additional directories must be specified in INCLUDEPATH; my app's myApp.pro looks like this, where $QT is my QT source directory:
INCLUDEPATH += $QT/5.14.2/Src/qtdatavis3d/src/
INCLUDEPATH += $QT/5.14.2/Src/qtdatavis3d/src/datavisualization/global
INCLUDEPATH += $QT/5.14.2/Src/qtdatavis3d/src/datavisualization/engine/
INCLUDEPATH += $QT/5.14.2/Src/qtdatavis3d/src/datavisualization/data/
INCLUDEPATH +=$QT/5.14.2/Src/qtdatavis3d/src/datavisualization/theme
INCLUDEPATH += $QT/5.14.2/Src/qtdatavis3d/src/datavisualizationqml2
I am developing for a desktop Linux target, and the DeclarativeSurface code is in library $QT/5.14.2/gcc_64/qml/QtDataVisualization/libdatavisualizationqml2.so