You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built with ninja -v and -DHAVE_GLEW is correctly passed to the compiler.
I then created the following test.cpp:
#include <pangolin/pangolin.h>
and tried to compile with gcc -Wfatal-errors -Idest/usr/local/include test.cpp:
In file included from dest/usr/local/include/pangolin/gl/gl.h:324,
from dest/usr/local/include/pangolin/handler/handler.h:31,
from dest/usr/local/include/pangolin/display/widgets.h:32,
from dest/usr/local/include/pangolin/pangolin.h:40,
from test.cpp:1:
dest/usr/local/include/pangolin/gl/gl.hpp: In member function 'void pangolin::GlTexture::CopyFrom(const pangolin::GlTexture&)':
dest/usr/local/include/pangolin/gl/gl.hpp:348:5: error: 'glCopyImageSubDataNV' was not declared in this scope
348 | glCopyImageSubDataNV(tex.tid, GL_TEXTURE_2D, 0, 0, 0, 0,
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
This is because nothing sets HAVE_GLEW in that case and in glplatform.h:
#ifdef HAVE_GLEW
#include <GL/glew.h>
#endif
is conditional.
For most other users it might work because
they coincidentally set -DHAVE_GLEW for other reasons,
they include GL/glew.h before they include pangolin.h,
or, they have these functions declared in GL/gl.h for some reasons which can be the case on some systems.
The first two can be used as a workaround.
The text was updated successfully, but these errors were encountered:
Since the library is split into many components, it saves me from having a seperate config.h.in file for each component, but I see it would cause problems for non-cmake users. I'm not sure what the most elegant solution is here. A workaround is to use CMake, but that won't suit everyone.
Since the library is split into many components, it saves me from having a seperate config.h.in file for each component, but I see it would cause problems for non-cmake users. I'm not sure what the most elegant solution is here. A workaround is to use CMake, but that won't suit everyone.
hi,steven .thanks to your nice code. and i use cmake 3.16 and the latest branch of pangolin ,it appears the kind of error "undefined gl*******" above.hope you can check this problem. the HAVE_GLEW defined in PangolinTargets.cmake seems not work .i defined it in my CMakeList.txt of my program to solve this tempararily..
Steps: I cloned the repo, built Pangolin from source. GLEW is found correctly,
I built with
ninja -v
and-DHAVE_GLEW
is correctly passed to the compiler.I then created the following
test.cpp
:and tried to compile with
gcc -Wfatal-errors -Idest/usr/local/include test.cpp
:This is because nothing sets
HAVE_GLEW
in that case and inglplatform.h
:is conditional.
For most other users it might work because
-DHAVE_GLEW
for other reasons,GL/glew.h
before they includepangolin.h
,GL/gl.h
for some reasons which can be the case on some systems.The first two can be used as a workaround.
The text was updated successfully, but these errors were encountered: