Coder Social home page Coder Social logo

Comments (2)

funkytaco avatar funkytaco commented on June 30, 2024

I Installed OpenNI-MacOSX-x64-2.2.0.33 and now I get:

g++ src/OSCeleton.cpp src/viewer.cpp -O3 -Wno-write-strings -Iliblo-0.26-modified -I/usr/X11/include -I/usr/include/ni -lOpenNI -lstdc++ -L/usr/X11/lib -lGL -lGLU -lglut liblo-0.26-modified/src/.libs/*.o -o osceleton
In file included from src/OSCeleton.cpp:28:
src/common.h:5:10: error: 'GL/glut.h' file not found with <angled> include; use "quotes" instead
#include <GL/glut.h>
         ^~~~~~~~~~~
         "GL/glut.h"
In file included from src/OSCeleton.cpp:28:
In file included from src/common.h:5:
src/GL/glut.h:137:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^
2 errors generated.
In file included from src/viewer.cpp:1:
src/common.h:5:10: error: 'GL/glut.h' file not found with <angled> include; use "quotes" instead
#include <GL/glut.h>
         ^~~~~~~~~~~
         "GL/glut.h"
In file included from src/viewer.cpp:1:
In file included from src/common.h:5:
src/GL/glut.h:137:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^
2 errors generated.
make: *** [osceleton] Error 1

from osceleton.

funkytaco avatar funkytaco commented on June 30, 2024

I modified one line in the Makefile:

g++ src/OSCeleton.cpp src/viewer.cpp -O3 -Wno-write-strings -Iliblo-0.26-modified -I/usr/X11/include -I/usr/include/ni -lOpenNI -lstdc++ -L/usr/X11/lib -framework OpenGL -framework GLUT liblo-0.26-modified/src/.libs/*.o -o osceleton

Based on this SO answer I modified viewer.cpp:

#ifndef __MAC__
#define __MAC__ 1
#endif

#ifdef __MAC__
# include <OpenGL/glu.h>
# include <OpenGL/gl.h>

#else
#include <GL/glu.h>
# include <GL/gl.h> 
#endif

$ ls /System/Library/Frameworks/GLUT.framework/headers

copy.h      glsmapint.h glutf90.h   intersect.h segment.h   vvector.h
extrude.h   glut.h      glutstroke.h    port.h      tube.h
glsmap.h    glutbitmap.h    gutil.h     rot.h       tube_gc.h

$ ls /System/Library/Frameworks/OpenGL.framework/Headers/

CGLContext.h        CGLMacro.h      OpenGLAvailability.h    glext.h         glu.h
CGLCurrent.h        CGLRenderers.h      gl.h            gliContext.h        gluContext.h
CGLDevice.h     CGLTypes.h      gl3.h           gliDispatch.h       gluMacro.h
CGLIOSurface.h      OpenGL.h        gl3ext.h        gltypes.h

I changed common.h to this:

#ifndef __MAC__
#define __MAC__ 1
#endif

#ifdef __MAC__
# include <GLUT/glut.h>
#else
#endif

extern int window;

#include "viewer.h"

I may have modified another file or two, but if I did, they were all errors relationg to the GL library.

from osceleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.