|
|
|
If you installed the RPM, the examples' source files are in
/usr/share/doc/QGLViewer/examples and you have to copy the desired example(s)
directories to a place where you have write permission.
If you have downloaded the tarball instead, simply go to the examples directory. Then,
> cd exampleDirectory > qmake [PREFIX=...] [INCLUDE_DIR=...] [LIB_DIR=...] > makeThe optional
PREFIX, INCLUDE_DIR and LIB_DIR parameters are those you used
if you customized your make install. This can
also be done in the examples's main directory to compile all the examples.
You may be prompted with an "error while loading shared libraries" message when trying
to execute an example. You probably forgot to add the libQGLViewer.so directory to your
default library path. Simply do this (use LD_LIBRARYN32_PATH instead on some Unix
flavors):
[bash] > export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/Path/To/libQGLViewer
[tcsh] > setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/Path/To/libQGLViewer
Some configurations may require you to add LIBS *= -lXi in the .pro file.
Debian users may have to replace -lQGLViewer-1 by -lQGLViewer (change the
Makefile or create a link on libQGLViewer.so in your lib directory).
See also the Qt-Unix and libQGLViewer on Unix installation pages.
The examples' compilation is essentially identical to the one described above in the linux section.
Simply replace the above lines by:
[bash] > export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Path/To/libQGLViewer
[tcsh] > setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/Path/To/libQGLViewer
You can safely ignore the prebound warning. Building a prebound library creates overlapping address
ranges. This requires further investigations, any help more than welcome.
See also the Qt-Mac and libQGLViewer on Mac installation pages.
Windows users have to compile each example separately, using the Open Qt project * icon. With Visual Studio 6.0, use File-Open workspace to open the
.dsp generated file.
.pro files (uncomment and remove end of
file as explained) and have to add /GX /GR in Project-Settings-C-C++, Project
options before compilation. One should also tune the include and lib paths:
libQGLViewer-1.3.9 (note there is no trailing QGLViewer) to your
Project-Properties-C/C++-General-Additional Include Directories *libQGLViewer-1.3.9\QGLViewer to your
Linker-General-Additional Library Directories *. Visual 6
users may add Release (or Debug) to this path: it must be the directoy
where QGLViewer.lib is located.All this should be done automatically if you use a Qt 3.x version.
See also the installation advices for Qt-Windows and libQGLViewer on Windows.| .NET | Visual Studio 6 |
|---|---|
| Open Qt Project | Generate Qt Project |
| Project-Properties-C/C++-General-Additional Include Directories | Tools-Options-Directories-Include files |
| Project-Properties-Linker-General-Additional Library Directories | Tools-Options-Directories-Library files |