Hi, all. We are using Pangolin library(https://github.com/stevenlovegrove/Pangolin) for 3D display( visualisation). The Pangolin library’s heart is a simple OpenGl viewport manager which aslo uses the header files of OpenGL as driverworks does. That is the reason of conflict.
More specifically, in our program, we use driverwork to capture the images of camera as the GMSL Camera Capture Sample does. At the same time, we also use Pangolin library to display the results of our program at real-time.
Some examples of error from the compilation results are as follows:
In file included from /usr/local/driveworks/include/dw/gl/GL.h:38:0,
from /usr/local/driveworks/include/common/Checks.hpp:4,
from /home/nvidia/Desktop/Enc_SLAM2/include/cameradriver.h:35,
from /home/nvidia/Desktop/Enc_SLAM2/Examples/mono_fish.cc:10:
/usr/include/GLES3/gl3.h:1128:75: error: ‘void __glewBeginTransformFeedback(GLenum)’ redeclared as different kind of symbol
GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
^
In file included from /home/nvidia/software/Pangolin-master/include/pangolin/gl/glplatform.h:59:0,
from /home/nvidia/software/Pangolin-master/include/pangolin/gl/glinclude.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/display/viewport.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/gl/gl.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/pangolin.h:33,
from /home/nvidia/Desktop/Enc_SLAM2/include/MapDrawer.h:27,
from /home/nvidia/Desktop/Enc_SLAM2/include/Viewer.h:26,
from /home/nvidia/Desktop/Enc_SLAM2/include/Tracking.h:28,
from /home/nvidia/Desktop/Enc_SLAM2/include/System.h:29,
from /home/nvidia/Desktop/Enc_SLAM2/Examples/mono_fish.cc:9:
/usr/include/GL/glew.h:16648:49: note: previous declaration ‘void (* __glewBeginTransformFeedback)(GLenum)’
GLEW_FUN_EXPORT PFNGLBEGINTRANSFORMFEEDBACKPROC __glewBeginTransformFeedback;
^
In file included from /usr/local/driveworks/include/dw/gl/GL.h:38:0,
from /usr/local/driveworks/include/common/Checks.hpp:4,
from /home/nvidia/Desktop/Enc_SLAM2/include/cameradriver.h:35,
from /home/nvidia/Desktop/Enc_SLAM2/Examples/mono_fish.cc:10:
/usr/include/GLES3/gl3.h:1129:57: error: ‘void __glewEndTransformFeedback()’ redeclared as different kind of symbol
GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
^
In file included from /home/nvidia/software/Pangolin-master/include/pangolin/gl/glplatform.h:59:0,
from /home/nvidia/software/Pangolin-master/include/pangolin/gl/glinclude.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/display/viewport.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/gl/gl.h:30,
from /home/nvidia/software/Pangolin-master/include/pangolin/pangolin.h:33,
from /home/nvidia/Desktop/Enc_SLAM2/include/MapDrawer.h:27,
from /home/nvidia/Desktop/Enc_SLAM2/include/Viewer.h:26,
from /home/nvidia/Desktop/Enc_SLAM2/include/Tracking.h:28,
from /home/nvidia/Desktop/Enc_SLAM2/include/System.h:29,
from /home/nvidia/Desktop/Enc_SLAM2/Examples/mono_fish.cc:9:
/usr/include/GL/glew.h:16659:47: note: previous declaration ‘void (* __glewEndTransformFeedback)()’
GLEW_FUN_EXPORT PFNGLENDTRANSFORMFEEDBACKPROC __glewEndTransformFeedback;
Many redeclarations of variables originated from OpenGL happen and the compilation can not be succesfully finished. Apparently, this because both driverworks and the Pangolin library depend on the OpenGL library.
Does anyone can give us great advices to solve this problem?
Many thanks!