rpm -Uvh libQGLViewer-1.3.8-1.i586.rpm libQGLViewer-devel-1.3.8-1.i586.rpmThis will install the following files:
libQGLViewer-1.3.8.so
) in /usr/local/lib
.cw
custom widget files in /usr/local/include/QGLViewer
/usr/local/share/doc/QGLViewer
/usr
instead of the default
/usr/local
, use rpm -Uvh --prefix /usr ...
in the above line instead.
rpmbuild --rebuild libQGLViewer-1.3.8-1.src.rpm cd /usr/src/RPM/RPMS/i586/ (or /usr/src/redhat/RPMS/i586, see the rpmbuild last log lines) rpm -Uvh libQGLViewer-*1.3.8-1.i?86.rpmIf you need to modify the sources to fit your local installation, use:
rpm -Uvh libQGLViewer-1.3.8-1.src.rpm Edit /usr/src/[redhat|RPM]/SPECS/libQGLViewer-1.3.8.spec (tune QTDIR, install dir,...) Uncompress the sources in /usr/src/[redhat|RPM]/SOURCES/libQGLViewer-1.3.8.tar.gz, edit, and recompress. rpmbuild -ba /usr/src/[redhat|RPM]/SPECS/libQGLViewer-1.3.8.spec rpm -Uvh /usr/src/[redhat|RPM]/RPMS/i?86/libQGLViewer-*1.3.8-1.i?86.rpm
tar -xzf libQGLViewer-1.3.8.tar.gz cd libQGLViewer-1.3.8/QGLViewer qmake [PREFIX=...] [INCLUDE_DIR=...] [LIB_DIR=...] [DOC_DIR=...] make make installThe
qmake
flags are optionnal and let you customize your installation directories. A
typical usage would be qmake PREFIX=$HOME
. Here are the default values:
- Flag - - Default value - PREFIX /usr/local INCLUDE_DIR PREFIX/include LIB_DIR PREFIX/lib DOC_DIR PREFIX/share/docIf your Qt version is lower than 3.1, you need to link with the
glut
library :
uncomment a line in QGLViewer.pro
as explained
(glut
can be installed with a rpm or apt-get
libglut3-dev
).
cd ../examples qmake [PREFIX=...] [INCLUDE_DIR=...] [LIB_DIR=...] (use the same parameters as above, or use qmake INCLUDE_DIR=../.. LIB_DIR=../../QGLViewer if you didn't "make install" the library) make
You need to have the Qt library installed in order to run libQGLViewer. Check the Qt FAQ in case of problem.
Qt is probably already installed on your machine, or available on your distribution CDs. You may however have to install theqt3-devel
(Mandrake and redhat rpm) or aptget
libqt3-mt-dev
(debian) 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.
If your shell istcsh
or csh
(use echo $SHELL
to know), add
these lines to your .login
:
setenv QTDIR /usr/lib/qt3 (/usr/share/qt on debian) setenv PATH ${PATH}:${QTDIR}/bin/ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${QTDIR}/libWith
bash, zsh
or sh
, add these lines to your .profile
:
export QTDIR=/usr/lib/qt3 (/usr/share/qt on debian) export PATH=${PATH}:${QTDIR}/bin/ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/libYou may also have to add
/usr/local/lib
(or the place where you chose to install the
library) to your LD_LIBRARY_PATH
.
If only the non-threaded version of Qt is installed on your machine (libqt.so
instead
of libqt-mt.so
in ${QTDIR}/lib
), simply remove thread
from
QGLViewer/QGLViewer.pro
and examples' .pro
.
tar -xzf libQGLViewer-1.3.8.tar.gz (release 1) cd libQGLViewer-1.3.8/QGLViewer qmake [PREFIX=...] [INCLUDE_DIR=...] [LIB_DIR=...] [DOC_DIR=...] make make installThe
GL
(and GLUT
with old Qt
versions) path may have to be tuned in config.h
and QGLViewer.pro
.
Threads 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 correpond to your configuration.
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. Install Qt using the free
X11 edition.tcsh
or csh
(use echo $SHELL
to know), add
these lines to your .login
:
setenv QTDIR /sw (or 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-mwerks or macx-pbuilder)With
bash, zsh
or sh
, add these lines to your .profile
:
export QTDIR=/usr/lib/qt3 (/usr/share/qt on debian) export PATH=${PATH}:${QTDIR}/bin/ export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${QTDIR}/lib:/usr/local/lib export QMAKESPEC=darwin-g++ (or macx-g++ or macx-mwerks 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.
You may also have to add /usr/local/lib
(or the place where you chose to install the
library) to your DYLD_LIBRARY_PATH
.
libGL
(e.g. you used
the NVidia script), you may have to add --force
to the rpm
installation options.libQGLViewer.so
in your LD_LIBRARY_PATH
: setenv
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
(use DYLD_LIBRARY_PATH
on
mac)
ls
$QTDIR/lib
) is threaded (libqt-mt.so
) or not (libqt.so
). If you have
libqt.so
installed, edit QGLViewer/QGLViewer.pro
, remove
thread
and re-compile.qt3-devel
package (ls $QTDIR/lib
to find your Qt version).QGLViewer/QGLViewer.pro
and
replace release
by debug
in the CONFIG
line, and re-compile.Please let me know if you encountered specific installation problems that could be reported on this page.