我正在尝试使用Qt Creator 4.6.2在Windows 10上构建OpenSceneGraph 3.6.1,尽管我设法使构建顺利进行,但中途失败了。编译器将引发以下错误消息:
[ 76%] Built target osgdb_serializers_osgvolume
D:\development\OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp: In constructor 'osgViewer::Win32WindowingSystem::Win32WindowingSystem()':
D:\development\OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp:802:30: error: 'PROCESS_DPI_AWARENESS' is not a class or namespace
(*setProcessDpiAwareness)(PROCESS_DPI_AWARENESS::PROCESS_PER_MONITOR_DPI_AWARE);
^
src\osgViewer\CMakeFiles\osgViewer.dir\build.make:328: recipe for target 'src/osgViewer/CMakeFiles/osgViewer.dir/GraphicsWindowWin32.cpp.obj' failed
根据MS Windows Dev Center docs,PROCESS_DPI_AWARENESS
名称空间是在ShellScalingApi.h中定义的。
有人碰巧知道导致此问题的原因以及如何解决该问题吗?