FriendsofECCE / ECCE

The purpose of this repo is to allow continued development of the Extensible Computational Chemistry Environment (ECCE) which used to be maintained by the PNNL
Other
9 stars 5 forks source link

Build fails: error: 'GLUquadricObj' does not name a type #36

Open yurivict opened 6 years ago

yurivict commented 6 years ago

With gcc-7 compiler on FreeBSD 11.2, the build fails:

g++7 -O2 -pipe -fno-omit-frame-pointer  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc7 -isystem /usr/local/include -fno-strict-aliasing -I/usr/ports/science/ecce/work/ECCE-7.3.4-beta-8-gaf79f45/include -I/usr/include/freetype2/freetype -I/usr/local/lib/wx/include/gtk2-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -D_THREAD_SAFE -I/usr/ports/science/ecce/work/ECCE-7.3.4-beta-8-gaf79f45/3rdparty/mesa/include -c SoWxViewer.C -o /usr/ports/science/ecce/work/ECCE-7.3.4-beta-8-gaf79f45/obj/wxinv/SoWxViewer.o
SoWxViewer.C: In static member function 'static void SoWxViewer::drawViewerRollFeedback(SbVec2s, SbVec2s)':
SoWxViewer.C:1809:10: error: 'GLUquadricObj' does not name a type
   static GLUquadricObj *quad = NULL;
          ^~~~~~~~~~~~~
SoWxViewer.C:1810:9: error: 'quad' was not declared in this scope
   if (! quad) quad = gluNewQuadric();
         ^~~~
SoWxViewer.C:1810:9: note: suggested alternative: 'read'
   if (! quad) quad = gluNewQuadric();
         ^~~~
         read
SoWxViewer.C:1810:22: error: 'gluNewQuadric' was not declared in this scope
   if (! quad) quad = gluNewQuadric();
                      ^~~~~~~~~~~~~
SoWxViewer.C:1815:11: error: 'quad' was not declared in this scope
   gluDisk(quad, RADIUS, RADIUS+LINE_THICK, 20, 2);
           ^~~~
SoWxViewer.C:1815:11: note: suggested alternative: 'read'
   gluDisk(quad, RADIUS, RADIUS+LINE_THICK, 20, 2);
           ^~~~
           read
SoWxViewer.C:1815:3: error: 'gluDisk' was not declared in this scope
   gluDisk(quad, RADIUS, RADIUS+LINE_THICK, 20, 2);
   ^~~~~~~
SoWxViewer.C:1815:3: note: suggested alternative: 'glIsList'
   gluDisk(quad, RADIUS, RADIUS+LINE_THICK, 20, 2);
   ^~~~~~~
   glIsList
SoWxViewer.C:1816:3: error: 'gluPartialDisk' was not declared in this scope
   gluPartialDisk(quad, dist-2, dist+LINE_THICK-2, 20, 2, cirAng - ANGLE_LEN, 2 * ANGLE_LEN);
   ^~~~~~~~~~~~~~

Further, the build this continues after this error.

jiapei100 commented 5 years ago

Did you solve this issue?

ohlincha commented 5 years ago

Neither of us work with Free BSD, so this issue isn't being investigated.

TINY-KE commented 2 weeks ago

This is my solution. Should not only import pangolin.

1) In the CMakeLists.txt file, add the following:

find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)

include_directories(${OPENGL_INCLUDE_DIRS})
include_directories(${GLUT_INCLUDE_DIRS})

target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})

2) In the corresponding cpp file, add the header file: #include <GL/glu.h>