compilando PointViewer con un archivo MAKE en NITE y OpenNI

Actualmente estoy a tiempo con kinect openNi y NITE. De hecho, detecto la posición de la mano, por ejemplo, si la mano está sobre tu cabeza o no. Para esto necesito cambiar el PointViewer de NITE.

Sin embargo, no puedo compilar cuando modifico el código.

De hecho cuando hago un make estando en el archivo PointViewer, si hay errores, el compilador me los reporta todos pero cuando cierro para corregir, obtengo errores de referencia indefinidos con la librería en realidad Glut es como si no estuviera incluido, mientras que para mí es porque antes de que PointViewer modificara el código funcionaba.

Ya instalé freeglut3-dev e incluí las bibliotecas y . El problema se da al hacer el enlace como dijiste. ¿Hay alguna opción de compilación para que el enlace tenga éxito? ¿Cómo agregar opciones de compilador en el archivo MAKE para que pueda encontrar dónde está la biblioteca GLU?

¿Tienes alguna idea de lo que puede ser esto?

Aquí obtien lce:

g++ -o ../Bin/x64-Release/Sample-PointViewer ./x64-Release/main.o ./x64-Release/PointDrawer.o ./x64-Release/signal_catch.o  -L../Bin/x64-Release -lglut -lOpenNI -lXnVNite_1_5_2
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glClear'
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glMatrixMode'
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glPushMatrix'
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glLoadIdentity'
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glOrtho'
./x64-Release/main.o:main.cpp:function glutDisplay(): error: undefined reference to 'glDisable'
./x64-Release/main.o:main.cpp:function glInit(int*, char**): error: undefined reference to 'glDisable'
./x64-Release/main.o:main.cpp:function glInit(int*, char**): error: undefined reference to 'glEnable'
./x64-Release/main.o:main.cpp:function glInit(int*, char**): error: undefined reference to 'glEnableClientState'
./x64-Release/main.o:main.cpp:function glInit(int*, char**): error: undefined reference to 'glDisableClientState'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function initTexture(void**, int&, int&): error: undefined reference to 'glGenTextures'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function initTexture(void**, int&, int&): error: undefined reference to 'glBindTexture'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function initTexture(void**, int&, int&): error: undefined reference to 'glTexParameteri'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function initTexture(void**, int&, int&): error: undefined reference to 'glTexParameteri'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawRectangle(float, float, float, float): error: undefined reference to 'glVertexPointer'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawRectangle(float, float, float, float): error: undefined reference to 'glDrawArrays'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawRectangle(float, float, float, float): error: undefined reference to 'glFlush'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawTexture(float, float, float, float): error: undefined reference to 'glEnableClientState'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawTexture(float, float, float, float): error: undefined reference to 'glTexCoordPointer'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawDepthMap(xn::DepthMetaData const&): error: undefined reference to 'glBindTexture'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawDepthMap(xn::DepthMetaData const&): error: undefined reference to 'glTexImage2D'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawDepthMap(xn::DepthMetaData const&): error: undefined reference to 'glColor4f'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawDepthMap(xn::DepthMetaData const&): error: undefined reference to 'glEnable'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawFrameID(unsigned int): error: undefined reference to 'glColor4f'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawFrameID(unsigned int): error: undefined reference to 'glRasterPos2i'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glColor4f'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glPointSize'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glVertexPointer'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glDrawArrays'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glColor4f'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glPointSize'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glDrawArrays'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function XnVPointDrawer::Draw() const: error: undefined reference to 'glFlush'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function PrintSessionState(SessionState): error: undefined reference to 'glRasterPos2i'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function PrintSessionState(SessionState): error: undefined reference to 'pthread_create'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function PrintSessionState(SessionState): error: undefined reference to 'pthread_join'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawTexture(float, float, float, float): error: undefined reference to 'glDisableClientState'
./x64-Release/PointDrawer.o:PointDrawer.cpp:function DrawDepthMap(xn::DepthMetaData const&): error: undefined reference to 'glDisable'
collect2: ld returned 1 exit status
make: *** [../Bin/x64-Release/Sample-PointViewer] Error 1

Gracias por adelantado

preguntado el 31 de julio de 12 a las 11:07

2 Respuestas

Debe agregar algunas bibliotecas al proceso de enlace. Comience agregando -lGL -lpthread. (glClear está definido en libGL.so y los pthread están en libpthread.so. Esto está en Linux; es posible que deba instalar el paquete freeglut3-dev en Ubuntu para obtener libGL).

Respondido 01 ago 12, 01:08

Gracias por las respuestas. Ya instalé freeglut3-dev e incluí las librerías y . El problema se da al hacer el enlace como dijiste. ¿Hay alguna opción de compilación para que el enlace tenga éxito? ¿Cómo agregar opciones de compilador en el archivo MAKE para que pueda encontrar dónde está la biblioteca GLU? - xeuch

Deberá ubicar el paso de enlace en el Makefile (el que no code g++ -o ../Bin/x64-Release/Sample-PointViewer ./x64-Release/main.o ./x64-Release/PointDrawer.o ./x64-Release/signal_catch.o -L../Bin/x64-Release -lglut -lOpenNI -lXnVNite_1_5_2 - y luego agregue -lGL -lpthread o -framework GL -pthread dependiendo de si usa Ubuntu o Mac. - parar

Los primeros errores parecen estar relacionados con GL/GLUT. Asegúrese de tener las rutas de inclusión y biblioteca configuradas correctamente.

Acabo de compilar la muestra en osx usando Qt Creator, pero eliminé opengles.cpp del proyecto porque estaba buscando una biblioteca que no pude encontrar en mi sistema. Si ayuda, aquí está mi archivo de proyecto de la aplicación Qt Console:

#-------------------------------------------------
#
# Project created by QtCreator 2012-08-01T01:22:11
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = NitePointViewer
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app

INCLUDEPATH += /usr/include/ni
INCLUDEPATH += /usr/include/nite
LIBS += /usr/lib/libXnCore.dylib
LIBS += /usr/lib/libXnDDK.dylib
LIBS += /usr/lib/libXnDeviceFile.dylib
LIBS += /usr/lib/libXnDeviceSensorV2.dylib
LIBS += /usr/lib/libXnFormats.dylib
LIBS += /usr/lib/libXnVCNITE_1_5_2.dylib
LIBS += /usr/lib/libXnVFeatures_1_5_2.dylib
LIBS += /usr/lib/libXnVNite_1_5_2.dylib
LIBS += /usr/lib/libnimCodecs.dylib
LIBS += /usr/lib/libnimMockNodes.dylib
LIBS += /usr/lib/libnimRecorder.dylib
LIBS += /usr/lib/libOpenNI.dylib
LIBS += -framework OpenGL
LIBS += -framework GLUT
LIBS += Libs/glut64.lib

SOURCES += main.cpp \
    signal_catch.cpp \
    PointDrawer.cpp \
    kbhit.cpp

HEADERS += \
    GL/wglext.h \
    GL/glut.h \
    GL/glext.h \
    GL/gl.h \
    GLES/gl.h \
    GLES/gl_1_0.h \
    GLES/egltypes.h \
    GLES/egl.h \
    GLES/egl_1_0.h \
    glh/glh_text.h \
    glh/glh_obs.h \
    glh/glh_mipmaps.h \
    glh/glh_linear.h \
    glh/glh_interactors.h \
    glh/glh_glut2.h \
    glh/glh_glut.h \
    glh/glh_glut_text.h \
    glh/glh_glut_replay.h \
    glh/glh_glut_callfunc.h \
    glh/glh_genext.h \
    glh/glh_extensions.h \
    glh/glh_cube_map.h \
    glh/glh_convenience.h \
    glh/glh_array.h \
    signal_catch.h \
    PointDrawer.h \
    opengles.h \
    kbhit.h

y el Makefile generado:

#############################################################################
# Makefile for building: NitePointViewer
# Generated by qmake (2.01a) (Qt 4.7.4) on: Wed Aug 1 01:50:26 2012
# Project:  NitePointViewer.pro
# Template: app
# Command: /Users/george/QtSDK/Desktop/Qt/474/gcc/bin/qmake -spec ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -o Makefile NitePointViewer.pro
#############################################################################

####### Compiler, tools and options

CC            = gcc
CXX           = g++
DEFINES       = -DQT_CORE_LIB
CFLAGS        = -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES)
CXXFLAGS      = -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES)
INCPATH       = -I../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -I. -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtCore.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../QtSDK/Desktop/Qt/474/gcc/include -I/usr/include/ni -I/usr/include/nite -I. -F/Users/george/QtSDK/Desktop/Qt/474/gcc/lib
LINK          = g++
LFLAGS        = -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
LIBS          = $(SUBLIBS) -F/Users/george/QtSDK/Desktop/Qt/474/gcc/lib -L/Users/george/QtSDK/Desktop/Qt/474/gcc/lib /usr/lib/libXnCore.dylib /usr/lib/libXnDDK.dylib /usr/lib/libXnDeviceFile.dylib /usr/lib/libXnDeviceSensorV2.dylib /usr/lib/libXnFormats.dylib /usr/lib/libXnVCNITE_1_5_2.dylib /usr/lib/libXnVFeatures_1_5_2.dylib /usr/lib/libXnVNite_1_5_2.dylib /usr/lib/libnimCodecs.dylib /usr/lib/libnimMockNodes.dylib /usr/lib/libnimRecorder.dylib /usr/lib/libOpenNI.dylib -framework OpenGL -framework GLUT Libs/glut64.lib -framework QtCore 
AR            = ar cq
RANLIB        = ranlib -s
QMAKE         = /Users/george/QtSDK/Desktop/Qt/474/gcc/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = cp -f
COPY_DIR      = cp -f -R
STRIP         = 
INSTALL_FILE  = $(COPY_FILE)
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = $(COPY_FILE)
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p
export MACOSX_DEPLOYMENT_TARGET = 10.4

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES       = main.cpp \
        signal_catch.cpp \
        PointDrawer.cpp \
        kbhit.cpp 
OBJECTS       = main.o \
        signal_catch.o \
        PointDrawer.o \
        kbhit.o
DIST          = ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/unix.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac-g++.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/qconfig.pri \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/modules/qt_webkit_version.pri \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_functions.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_config.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/exclusive_builds.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_pre.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_pre.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/dwarf2.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/debug.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_post.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_post.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/x86_64.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/objective_c.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/warn_on.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/unix/thread.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/moc.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/rez.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/sdk.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/resources.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/uic.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/yacc.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/lex.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/include_source_dir.prf \
        NitePointViewer.pro
QMAKE_TARGET  = NitePointViewer
DESTDIR       = 
TARGET        = NitePointViewer

####### Custom Compiler Variables
QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
        -g \
        -gdwarf-2 \
        -arch \
        x86_64 \
        -Xarch_x86_64 \
        -mmacosx-version-min=10.5 \
        -Wall \
        -W


first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
    $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: Makefile $(TARGET)

$(TARGET):  $(OBJECTS)  
    $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: NitePointViewer.pro  ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++/qmake.conf ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/unix.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac-g++.conf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/qconfig.pri \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/modules/qt_webkit_version.pri \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_functions.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_config.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/exclusive_builds.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_pre.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_pre.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/dwarf2.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/debug.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_post.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_post.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/x86_64.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/objective_c.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/warn_on.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/unix/thread.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/moc.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/rez.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/sdk.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/resources.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/uic.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/yacc.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/lex.prf \
        ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/include_source_dir.prf
    $(QMAKE) -spec ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -o Makefile NitePointViewer.pro
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/unix.conf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac.conf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/common/mac-g++.conf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/qconfig.pri:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/modules/qt_webkit_version.pri:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_functions.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt_config.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/exclusive_builds.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_pre.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_pre.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/dwarf2.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/debug.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/default_post.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/default_post.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/x86_64.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/objective_c.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/warn_on.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/qt.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/unix/thread.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/moc.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/rez.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/mac/sdk.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/resources.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/uic.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/yacc.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/lex.prf:
../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/features/include_source_dir.prf:
qmake:  FORCE
    @$(QMAKE) -spec ../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -o Makefile NitePointViewer.pro

dist: 
    @$(CHK_DIR_EXISTS) .tmp/NitePointViewer1.0.0 || $(MKDIR) .tmp/NitePointViewer1.0.0 
    $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/NitePointViewer1.0.0/ && $(COPY_FILE) --parents GL/wglext.h GL/glut.h GL/glext.h GL/gl.h GLES/gl.h GLES/gl_1_0.h GLES/egltypes.h GLES/egl.h GLES/egl_1_0.h glh/glh_text.h glh/glh_obs.h glh/glh_mipmaps.h glh/glh_linear.h glh/glh_interactors.h glh/glh_glut2.h glh/glh_glut.h glh/glh_glut_text.h glh/glh_glut_replay.h glh/glh_glut_callfunc.h glh/glh_genext.h glh/glh_extensions.h glh/glh_cube_map.h glh/glh_convenience.h glh/glh_array.h signal_catch.h PointDrawer.h opengles.h kbhit.h .tmp/NitePointViewer1.0.0/ && $(COPY_FILE) --parents main.cpp signal_catch.cpp PointDrawer.cpp kbhit.cpp .tmp/NitePointViewer1.0.0/ && (cd `dirname .tmp/NitePointViewer1.0.0` && $(TAR) NitePointViewer1.0.0.tar NitePointViewer1.0.0 && $(COMPRESS) NitePointViewer1.0.0.tar) && $(MOVE) `dirname .tmp/NitePointViewer1.0.0`/NitePointViewer1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/NitePointViewer1.0.0


clean:compiler_clean 
    -$(DEL_FILE) $(OBJECTS)
    -$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
    -$(DEL_FILE) $(TARGET) 
    -$(DEL_FILE) Makefile


check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_objective_c_make_all:
compiler_objective_c_clean:
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
    -$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_rez_source_make_all:
compiler_rez_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: 

####### Compile

main.o: main.cpp PointDrawer.h \
        GL/glut.h \
        GL/gl.h \
        GL/glext.h \
        opengles.h \
        GLES/gl.h \
        GLES/egl.h \
        GLES/egltypes.h \
        kbhit.h \
        signal_catch.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp

signal_catch.o: signal_catch.cpp signal_catch.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o signal_catch.o signal_catch.cpp

PointDrawer.o: PointDrawer.cpp PointDrawer.h \
        GL/glut.h \
        GL/gl.h \
        GL/glext.h \
        opengles.h \
        GLES/gl.h \
        GLES/egl.h \
        GLES/egltypes.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PointDrawer.o PointDrawer.cpp

kbhit.o: kbhit.cpp kbhit.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o kbhit.o kbhit.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:

También en main.cpp y PointDrawer.cpp he agregado:

#define USE_GLUT

Respondido 01 ago 12, 02:08

gracias por la respuesta Gracias por las respuestas. Ya instalé freeglut3-dev e incluí las librerías y . El problema se da al hacer el enlace como dijiste. ¿Hay alguna opción de compilación para que el enlace tenga éxito? ¿Cómo agregar opciones de compilador en el archivo MAKE para que pueda encontrar dónde está la biblioteca GLU? - xeuch

Como está usando freeglut3-dev, asumo que está usando Ubuntu. Puedes probar LIBS = -lglut or LIBS = -L/path/to/your/freeglut3-dev, pero eso es lo primero que se me ocurre, no puedo probar en Ubuntu ahora - Jorge Profenza

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.