When compiling the latest OCC:
commit 8748042259f22d72b3b076bc5433a54ca42734e4 (origin/master, origin/HEAD)
Author: akaftasev <akaftasev@opencascade.com>
Date: Mon May 22 12:00:32 2023 +0100
against VTK V9.2.6,I got this error:
In file included from /usr/include/GL/glx.h:30,
from /home/alex/workspace/OCCT/src/IVtkDraw/IVtkDraw_Interactor.cxx:23:
/usr/local/include/vtk-9.2/vtksys/Status.hxx:15:21: error: expected identifier before ‘int’
15 | class vtksys_EXPORT Status
| ^~~~~~
In file included from /usr/local/include/vtk-9.2/vtksys/SystemTools.hxx:7,
from /usr/local/include/vtk-9.2/vtkSetGet.h:35,
from /usr/local/include/vtk-9.2/vtkObject.h:46,
from /usr/local/include/vtk-9.2/vtkCommand.h:235,
from /usr/local/include/vtk-9.2/vtkRenderWindowInteractor.h:48,
from /usr/local/include/vtk-9.2/vtkXRenderWindowInteractor.h:35,
from /home/alex/workspace/OCCT/src/IVtkDraw/IVtkDraw_Interactor.cxx:31:
/usr/local/include/vtk-9.2/vtksys/Status.hxx:16:1: error: expected unqualified-id before ‘{’ token
16 | {
| ^
make[2]: *** [src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/build.make:104: src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw_Interactor.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3656: src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
It seems that some vtk macros don’t get recognized,and I have tried to add this:
include_directories("/usr/local/include/vtk-9.2")
into
/home/user/OCCT/adm/cmake/vtk.cmake
,
but got no luky,Question is:
Can this issue be fixed by modifying vtk.cmake?
If yes,how?