1

私は現在、kinect openNi と NITE をスケジュールどおりに進めています。実際、手が頭の上にあるかどうかなど、手の位置を検出します。このためには、NITE の PointViewer を変更する必要があります。

ただし、コードを変更するとコンパイルできません。

実際、ファイルPointViewerにあるmakeを行うと、エラーがある場合、コンパイラーはそれらすべてを私に報告しますが、修正に近づくと、書店で未定義の参照エラーを取得します実際にGlut彼は含まれていなかったようですが、私にとっては、PointViewer が変更される前にコードが機能したためです。

私はすでに freeglut3-dev をインストールしており、ライブラリと . あなたが言ったようにリンクを作成するときに問題が発生します。リンクを成功させるためのコンパイラ オプションはありますか? GLUライブラリがどこにあるかを見つけることができるように、makefileにコンパイラオプションを追加する方法は?

これが何であるかについての考えはありますか?

ここで私は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

前もって感謝します

4

2 に答える 2

0

リンク プロセスにいくつかのライブラリを追加する必要があります。-lGL -lpthread を追加することから始めます。(glClear は libGL.so で定義され、pthread のものは libpthread.so で定義されています。これは Linux 上にあります。libGL を取得するには、Ubuntu に freeglut3-dev パッケージをインストールする必要がある場合があります。)

于 2012-08-01T00:35:00.817 に答える
0

最初のエラーは GL/GLUT に関連しているように見えます。インクルードパスとライブラリパスが正しく設定されていることを確認してください。

Qt Creator を使用して osx でサンプルをコンパイルしましたが、システムで見つからないライブラリを探していたため、プロジェクトから opengles.cpp を削除しました。それが役立つ場合は、ここに私の Qt コンソール アプリ プロジェクト ファイルがあります。

#-------------------------------------------------
#
# 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

および生成された Makefile:

#############################################################################
# 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:

また、main.cpp と PointDrawer.cpp に以下を追加しました。

#define USE_GLUT
于 2012-08-01T01:01:03.427 に答える