rpm -Uvh libQGLViewer-2.1.1-7.i586.rpm libQGLViewer-devel-2.1.1-7.i586.rpmYou should re-compile for optimal results:
rpmbuild --rebuild libQGLViewer-2.1.1-7.src.rpm cd /usr/src/RPM/RPMS/i586/ (or /usr/src/redhat/RPMS/i586, see the rpmbuild last log lines) rpm -Uvh libQGLViewer-*2.1.1-7.i?86.rpmor using the source tarball:
tar -xzf libQGLViewer-2.1.1-7.tar.gz cd libQGLViewer-2.1.1-7/QGLViewer qmake (see options below) make make installYou need root privileges to install the library, since default install paths are system directories.
cd ../examples qmake make
libQGLViewer-2.1.1.so
and libQGLViewer-2.1.1.a
) in /usr/lib
/usr/include/QGLViewer
/usr/share/doc/QGLViewer
» RPM customization
If you want to change the RPM installation prefix, say to /usr/local
(default is
/usr
), use rpm -Uvh --prefix /usr/local ...
in the rpm command line
instead.
» qmake customization
Optional qmake
parameters let you customize your make install
target installation directories:
qmake [PREFIX=...] [INCLUDE_DIR=...] [LIB_DIR=...] [DOC_DIR=...]A typical usage would be
qmake PREFIX=$HOME
. Default values are:
- Param - - Default value - PREFIX /usr LIB_DIR PREFIX/lib INCLUDE_DIR PREFIX/include DOC_DIR PREFIX/share/docUse the same
qmake
parameters when you compile the examples.
If your Qt version is lower than 3.1, you need to link with the glut
library: uncomment
a line in QGLViewer.pro
as explained there.
glut can be installed from the freeglut-devel
rpm or using apt-get
install libglut3-dev
.
dev
" development package. The complete Qt/X11
non commercial version can also freely be downloaded from Trolltech.
Try to compile a simple Qt example and check the Qt FAQ page in case of problem. Consider compiling one of the Qt OpenGL examples to test your configuration.
With Qt version 3, you need to set some shell variables. If your shell isbash
or
zsh
(use echo $SHELL
to know), add these lines to your
.profile
:
export QTDIR=/usr/lib/qt3 (or /usr/lib/qt-3.3 or /usr/share/qt...) export PATH=${PATH}:${QTDIR}/bin export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/libIf you use
tcsh
or csh
instead, add these lines to your .login
:
setenv QTDIR /usr/lib/qt3 (or /usr/lib/qt-3.3 or /usr/share/qt...) setenv PATH ${PATH}:${QTDIR}/bin setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${QTDIR}/libSource this file or open a new shell to take these values into account. If you installed
libQGLViewer
in a custom directory, add the path to this directory in
LD_LIBRARY_PATH
as is done above for ${QTDIR}/lib
.
tar -xzf libQGLViewer-2.1.1-7.tar.gz cd libQGLViewer-2.1.1-7/QGLViewer qmake make make installSee the Linux section for details and install paths customization. Once the library is installed, compile the examples and test them:
cd ../examples qmake makeThreads are activated with the
darwin-g++
version and disabled with macx
.
Add or remove thread
in the CONFIG
section of .pro
files
if this does not correspond to your Qt configuration.
If your Qt version is lower than 3.1, you need to link with the glut
library. Install
glut
and uncomment a line in QGLViewer.pro
as explained.
Qt/Mac
native version (also called macx
) designed for Aqua, and
released as a GPL Free Edition. It can freely be downloaded from Trolltech.darwin
version, that relies on the X11 implementation. You need to launch the X11 application to
run your programs and have to install Qt using the free
X11 edition.bash
or zsh
(use echo $SHELL
to know), add
these lines to your .profile
:
export QTDIR=/sw (if you use fink, or to set to where ever Qt was installed) export PATH=${PATH}:${QTDIR}/bin export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${QTDIR}/lib export QMAKESPEC=darwin-g++ (or macx-g++ or macx-xcode or macx-pbuilder)If you use
tcsh
or csh
instead, add these lines to your .login
:
setenv QTDIR /sw (if you use fink, or to set to where ever Qt was installed) setenv PATH ${PATH}:${QTDIR}/bin setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${QTDIR}/lib setenv QMAKESPEC darwin-g++ (or macx-g++ or macx-xcode or macx-pbuilder)Your
QMAKESPEC
should correspond to your Qt installation : macx-g++
for
Qt/Mac (or macx-mwerks
with CodeWarrior, macx-pbuilder
with Project
Builder) and darwin-g++
for X11. Compile a simple Qt example to check your configuration.
If you installed libQGLViewer
in a custom directory, add the path to this directory in
DYLD_LIBRARY_PATH
as is done above for ${QTDIR}/lib
.
cd designerPlugin qmake make make installThe
designerPlugin
directory is located in the tarball root directory or in
/usr/include/QGLViewer/designerPlugin
if you installed QGLViewer from the RPM. The
make install
step requires root privileges since the plugin is installed in
QTDIR/plugins/designer
, which is usually a system directory.
Such a plugin eases the creation of user interfaces that feature a QGLViewer using designer. It
adds a QGLViewer icon in the designer's Display Widgets
tab:
When added to your interface, the widget displays the standard spiral, which can be manipulated when you test it. All the viewers' signals and slots are available and can be connected to your interface. Start from this code to create your own designer plugin for your derived QGLViewer classes.
Note thatlibQGLViewer.so
needs to be found by designer
in order to load
the plugin. If you didn't "make install
", add the path to the .so
(resp
.dylib
with Mac) in your LD_LIBRARY_PATH
(resp. DYLD_LIBRARY_PATH
) as explained in the Qt installation sections above.
With Qt version 3, an alternative to this plugin is to add a "Custom Widget" using the
Tools/Custom designer menu. Load Descriptions... and provide the
qglviewer.cw
custom widget description file, located in the QGLViewer header files
directory. You can customize this description with your own signals and slots and change the header
file path.
qtObsolete
conflicts with previous declaration : error
message. See the mac example section.version=""
in the first line of the ui
file.libQGLViewer.so
in your LD_LIBRARY_PATH
(see above).QGLViewer.pro
, replace release
by debug
in the
CONFIG
line, and re-compile.qvaluevector.h
while
compiling keyFrameInterpolator.cpp
: include frame.h
(see top of
keyFrameInterpolator.cpp
).translate
and rotate
in Frame.h
. Simply comment the
const
versions of these methods.QMAKE_COPY_FILE
modification in QGLViewer.pro
QString
: Uncomment the patch in
config.h
thread
in the
CONFIG
line of QGLViewer.pro
and re-compile.QMAKE_CXXFLAGS *= -fexceptions
in QGLViewer.pro
.Please let me know if you encounter specific installation problems.