私はここに少しの状況があります。私はOpenSGで働こうとしています。私はパッケージをダウンロードし、INSTALLファイルに指示された通りにインストールしました。次に、システム依存ライブラリもインストールしました。今私はチュートリアルを構築しようとし、それはエラーを示しています。それはglutが設定されていないと言いますが、設定中にglutライブラリを有効にし、依存パッケージとライブラリもすべてインストールしました。私は問題が何であるか理解していません。OpenSGを使用したレンダリング
[email protected]:~/OpenSG/Tutorials$ make
g++ Warning GLUT not configured, ignoring request -D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -D_OSG_HAVE_CONFIGURED_H_ -DQT_NO_XINERAMA -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_XKB - DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_AQUA - DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_COMPACT -ansi -use_readonly_const -ftemplate-depth-100 -g -DOSG_DEBUG -I/usr/local/include 01hello.cpp Warning GLUT not configured, ignoring request -g -L/usr/local/lib/dbg -lOSGWindowX -lOSGSystem -lOSGBase - lGLU -lGL -lXmu -lXi -lXt -lX11 -lpthread -ldl -lm -L/usr/X11R6/lib -o 01hello
g++: Warning: No such file or directory
g++: GLUT: No such file or directory
g++: not: No such file or directory
g++: configured,: No such file or directory
g++: ignoring: No such file or directory
g++: request: No such file or directory
g++: Warning: No such file or directory
g++: GLUT: No such file or directory
g++: not: No such file or directory
g++: configured,: No such file or directory
g++: ignoring: No such file or directory
g++: request: No such file or directory
In file included from /usr/include/c++/4.4/ext/hash_map:60,
from /usr/local/include/OpenSG/OSGWindow.h:53,
from /usr/local/include/OpenSG/OSGGeometry.h:48,
from /usr/local/include/OpenSG/OSGSimpleGeometry.h:49,
from 01hello.cpp:19:
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
01hello.cpp: In function ‘int main(int, char**)’:
01hello.cpp:48: error: ‘GLUTWindowPtr’ was not declared in this scope
01hello.cpp:48: error: expected ‘;’ before ‘gwin’
01hello.cpp:49: error: ‘gwin’ was not declared in this scope
make: *** [01hello] Error 1
[email protected]:~/OpenSG/Tutorials$
誰も私は、私は本当に感謝されるこの解決策を見つけることができた場合は、次のようOpenSGチュートリアルを作るしようとしているときに示さ エラーがあります。
# trivial makefile for OpenSG tutorials
# use debug or opt libs?
LIBTYPE ?= dbg
# set the path to the installed osg-config executable here
# if you don't set it, the makefile tries to guess
# e.g. if you installed in /usr/local:
# OSGCONFIG := /usr/local/bin/osg-config
# *****************************************************
# you shouldn't have to change anything after this line
# *****************************************************
# try to guess the OSGCONFIG path
OSGCONFIG := notset
# use OSGPOOL if set
OSGPOOL ?= ..
# try to get configured information first, will not work if more
# than one system is configured from one dir. Just for the 1.0
OSGINSTALLPREFIX := notset
PREFIXSUFFIX := $(shell $(OSGPOOL)/CommonConf/config.guess)
-include .prefix.$(PREFIXSUFFIX)
ifneq ($(OSGINSTALLPREFIX),notset)
OSGCONFIG := $(OSGINSTALLPREFIX)/bin/osg-config
endif
ifneq ($(OSGROOT),)
OSGCONF := $(wildcard $(OSGROOT)/bin/osg-config)
ifneq ($(OSGCONF),)
OSGCONFIG := $(OSGCONF)
endif
endif
# if configure info wasn't found, maybe a Builds/* install?
ifeq ($(OSGCONFIG),notset)
INSTALLROOT := $(wildcard ../Builds/$(shell ../CommonConf/config.guess)-*)
OSGCONF := $(wildcard $(INSTALLROOT)/bin/osg-config)
ifneq ($(OSGCONF),)
OSGCONFIG := $(OSGCONF)
endif
endif
# maybe we can find it in the path?
ifeq ($(OSGCONFIG),notset)
OSGCONF := \
$(shell if which osg-config >/dev/null 2>&1; then which osg-config; fi)
OSGCONF := $(strip $(OSGCONF))
ifneq ($(OSGCONF),)
OSGCONFIG := $(OSGCONF)
endif
endif
# ok, give up
ifeq ($(OSGCONFIG),notset)
$(error Can't find osg-config, please configure the Makefile or \
add it to your PATH)
endif
### System dependencies ###############################################
# Set the system we're running on
SYSTEM := $(shell uname)
# which extension to be used for executables
EXEEXT :=
# which extension to be used for executables
ADDLIB :=
# be very careful with these lines. There needs to be a space after the Unix
# lines and nothing after the win lines!!
ifeq ($(SYSTEM),IRIX)
CCOUT := -o
LDOUT := -o
LINK :=
ADDLIB := X
endif
ifeq ($(SYSTEM),IRIX64)
CCOUT := -o
LDOUT := -o
LINK :=
ADDLIB := X
endif
ifeq ($(SYSTEM),Linux)
CCOUT := -o
LDOUT := -o
LINK :=
ADDLIB := X
endif
ifeq ($(findstring WIN,$(SYSTEM)),WIN)
OS := WIN32
CCOUT := -Fo
LDOUT := /out:
LINK := -link
EXEEXT :=.exe
endif
ifeq ($(SYSTEM),HP-UX)
CCOUT := -o
LDOUT := -o
LINK :=
ADDLIB := X
endif
ifeq ($(SYSTEM),Darwin)
CCOUT := -o
LDOUT := -o
LINK :=
endif
# Var settings
ifeq ($(findstring WIN,$(SYSTEM)),WIN)
CC = "$(shell $(OSGCONFIG) --compiler)"
else
CC = $(shell $(OSGCONFIG) --compiler)
endif
CCFLAGS = $(shell $(OSGCONFIG) --cflags --$(LIBTYPE) Base System $(ADDLIB) GLUT)
LDFLAGS = $(LINK) $(shell $(OSGCONFIG) --libs --$(LIBTYPE) Base System $(ADDLIB) GLUT)
# all tutorials in this directory
TUTS := $(wildcard [0-9][0-9]*.cpp)
PROGS := $(TUTS:.cpp=$(EXEEXT))
ifeq ($(findstring WIN,$(SYSTEM)),WIN)
TUTS := $(filter-out %X.cpp, $(TUTS))
endif
# program dependencies
default: $(PROGS)
# make rules
.PHONY: clean Clean
clean:
rm -f *.o
rm -f *.obj
rm -rf ii_files
rm -f *.pdb
rm -f *.ilk
rm -f *.idb
Clean: clean
rm -f $(PROGS)
%.o: %.cpp
$(CC) -c $(CCFLAGS) $<
%: %.o
$(CC) $(LDOUT)[email protected] $< $(LDFLAGS)
%$(EXEEXT): %.cpp
$(CC) $(CCFLAGS) $< $(LDFLAGS) $(LDOUT)[email protected]
Iを設定し、再度opensgコンパイルしようとし、それが以前のエラーとは若干異なる次のエラーを示したチュートリアルを作成しようとすると次のよう
チュートリアルのメイクファイルです。前にこのエラーが発生しましたが、変更されました。エラー:
[email protected]:~/OpenSG/Tutorials$ make
g++ -D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -DOSG_WITH_GLUT -DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -D_OSG_HAVE_CONFIGURED_H_ -DQT_NO_XINERAMA -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_XKB -DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_COMPACT -ansi -use_readonly_const -ftemplate-depth-100 -g -DOSG_DEBUG -DOSG_WITH_GLUT -DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -I/usr/local/include 01hello.cpp -g -L/usr/local/lib/dbg -lOSGWindowGLUT -lOSGWindowX -lOSGSystem -lOSGBase -ltiff -ljpeg -lpng -lz -lglut -lGLU -lGL -lXmu -lXi -lXt -lX11 -lpthread -ldl -lm -L/usr/X11R6/lib -o 01hello
In file included from /usr/include/c++/4.4/ext/hash_map:60,
from /usr/local/include/OpenSG/OSGWindow.h:53,
from /usr/local/include/OpenSG/OSGGeometry.h:48,
from /usr/local/include/OpenSG/OSGSimpleGeometry.h:49,
from 01hello.cpp:19:
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make: *** [01hello] Error 1
[email protected]:~/OpenSG/Tutorials$
17-03-2011 私は不足しているライブラリをインストールした後にチュートリアルを作ってみました間、私が遭遇した新たなエラー:この行で
[email protected]:~/OpenSG$ cd Tutorials/
[email protected]:~/OpenSG/Tutorials$ make
g++ -D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -DOSG_WITH_GLUT -DOSG_WITH_TIF
-DOSG_WITH_JPG - DOSG_WITH_PNG -D_OSG_HAVE_CONFIGURED_H_ -DQT_NO_XINERAMA -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_XKB -DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_COMPACT -ansi -use_readonly_const -ftemplate-depth-100 -g -DOSG_DEBUG -DOSG_WITH_GLUT -DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -I/usr/local/include 18opengl_slave.cpp -g -L/usr/local/lib/dbg -lOSGWindowGLUT -lOSGWindowX -lOSGSystem -lOSGBase -ltiff -ljpeg -lpng -lz -lglut -lGLU -lGL -lXmu -lXi -lXt -lX11 -lpthread -ldl -lm -L/usr/X11R6/lib -o 18opengl_slave
In file included from /usr/include/c++/4.4/ext/hash_map:60,
from /usr/local/include/OpenSG/OSGWindow.h:53,
from /usr/local/include/OpenSG/OSGGeometry.h:48,
from /usr/local/include/OpenSG/OSGSimpleGeometry.h:49,
from 18opengl_slave.cpp:21:
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use
-Wno-deprecated.
18opengl_slave.cpp:70: error: ‘<anonymous>’ has incomplete type
18opengl_slave.cpp:70: error: invalid use of ‘GLvoid’
18opengl_slave.cpp: In function ‘GLvoid InitGL(GLsizei, GLsizei)’:
18opengl_slave.cpp:70: error: too few arguments to function ‘GLvoid LoadGLTextures(<type error>)’
18opengl_slave.cpp:92: error: at this point in file
18opengl_slave.cpp: At global scope:
18opengl_slave.cpp:310: error: ‘<anonymous>’ has incomplete type
18opengl_slave.cpp:310: error: invalid use of ‘GLvoid’
18opengl_slave.cpp: In function ‘int main(int, char**)’:
18opengl_slave.cpp:486: error: invalid conversion from ‘GLvoid (*)(<type error>)’ to ‘void (*)()’
18opengl_slave.cpp:486: error: initializing argument 1 of ‘void glutDisplayFunc(void (*)())’
make: *** [18opengl_slave] Error 1
[email protected]:~/OpenSG/Tutorials$
メイクファイルが悪いと思われます。g ++は最初の行でひどく苦情を申し立てます。過去にコピーできますか? – tibur
確かにチュートリアルはパッケージ自体で利用できました。 – Ani
@tibur:さまざまなエラーが同じ意味で表示されます。私がmakefileを扱っているのはこれが初めてです。あなたはmakefileで私を助けてくれますか? – Ani