README_VISUAL.TXT 5.22 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
 *** english version below ***

Compilation sous VisualExpress C++
Sylvain Thery's avatar
Sylvain Thery committed
4

Pierre Kraemer's avatar
Pierre Kraemer committed
5
Prérequis:
unknown's avatar
unknown committed
6
Visual Studio ou C++ Express (testé avec 2010 express)
7
CMake (au moins 2.8)
Pierre Kraemer's avatar
Pierre Kraemer committed
8

thery's avatar
thery committed
9
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
unknown's avatar
unknown committed
10
Installer boost et Qt (4.8.x pas de 5.0 pour le moment)
11 12 13 14 15 16 17 18

Attention installer les binaires de Qt dans une version de compilateur differente (VS2008/VS2010)
permet d'executer mais pas de debugger !
Si vous utiliser BoostPro (http://www.boostpro.com) installer toutes les versions multithread dll
pour eviter les pb de compilation.

Le plus sur mais plus long est de compiler soi-même Qt et Boost (bon courage)

Sylvain Thery's avatar
Sylvain Thery committed
19 20
Pour les "ThirdParty libs":
Lancer CMake (gui)
thery's avatar
thery committed
21
Mettre le chemin de la racine de CGoGN + /ThirdParty pour les sources
Sylvain Thery's avatar
Sylvain Thery committed
22
Mettre le chemin de la racine de CGoGN + /ThirdParty/build pour le build en release
unknown's avatar
unknown committed
23
Mettre le chemin de la racine de CGoGN + /ThirdParty/buildDebug pour le build en debug
Sylvain Thery's avatar
Sylvain Thery committed
24
Sous windows les 2 versions sont nécessaires.
unknown's avatar
unknown committed
25

unknown's avatar
unknown committed
26
La suite vaut pour les 2 répertoires:
thery's avatar
thery committed
27 28
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
29
Modifier les variables en fonctions de ce que vous voulez compiler (README.TXT de ThirdParty)
Sylvain Thery's avatar
Sylvain Thery committed
30
Modifier le CMAKE_PREFIX_PATH si nécessaire (cf remarque dépendances)
thery's avatar
thery committed
31 32
Recliquer sur Configure
Cliquer sur Generate
unknown's avatar
unknown committed
33 34
Aller sous visual, charger et compiler les 2 solutions 
Ne pas oublier de générer la cible INSTALL (une seule fois)
thery's avatar
thery committed
35

Sylvain Thery's avatar
Sylvain Thery committed
36
Pour CGoGN:
thery's avatar
thery committed
37
Relancer CMake
Sylvain Thery's avatar
Sylvain Thery committed
38 39
Mettre le chemin de la racine de CGoGN pour les sources
Mettre le chemin de la racine de CGoGN + /build (par exemple) pour le build
Pierre Kraemer's avatar
Pierre Kraemer committed
40 41
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Sylvain Thery's avatar
Sylvain Thery committed
42
Modifier les variables comme pour ThirdParty (et CMAKE_PREFIX_PATH si nécessaire)
Pierre Kraemer's avatar
Pierre Kraemer committed
43 44
Recliquer sur Configure
Cliquer sur Generate
thery's avatar
thery committed
45

unknown's avatar
unknown committed
46 47
Si il ne trouve pas Qt lui remplir la variable QT_QMAKE_EXECUTABLE

Pierre Kraemer's avatar
Pierre Kraemer committed
48 49
Aller dans Visual et double-cliquer sur CGoGN.sln !!

unknown's avatar
unknown committed
50 51 52 53 54
ATTENTION: Problème de link avec QGLViewer en Debug.
Si vous compiler un exemple (tuto1 & viewer) en Debug, il faut modifier
le projet: Proprietés de configuration -> Editeur de liens -> entrée -> Dépendances supplémentaires
et changer le QGLViewer2.lib en QGLViewerd2.lib

Sylvain Thery's avatar
Sylvain Thery committed
55 56
Pour que les executables fonctionnent ajouter le chemin vers les dll des dépendances dans la variable
d'environnement path (ou copier les dll dans un répertoire déjà dans le path)
Pierre Kraemer's avatar
Pierre Kraemer committed
57 58


Sylvain Thery's avatar
Sylvain Thery committed
59
Remarque dépendances:
60
Si vous voulez utiliser vos propre versions des dépendance (Zlib / glew / Boost / Qt)
Sylvain Thery's avatar
Sylvain Thery committed
61 62
changer le CMAKE_PREFIX_PATH (voir ci dessous)
Attention pour Boost le prefix path ne marche pas (utiliser BOOST_ROOT et d'autres si nécessaire)
63 64


unknown's avatar
unknown committed
65
Compilation 64bits: TODO
Pierre Kraemer's avatar
Pierre Kraemer committed
66

Sylvain Thery's avatar
Sylvain Thery committed
67 68 69 70 71 72 73


=========================================================================================
                                ENGLISH VERSION
=========================================================================================

Prerequisites:
unknown's avatar
unknown committed
74
Visual Studio and C ++ Express (2010)
Sylvain Thery's avatar
Sylvain Thery committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
CMake (at least 2.8)

Unzip the windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) is the root of CGoGN
Install boost and Qt


Warning installing the binaries of Qt in a version of different compilers (VS2008/VS2010)
allows you to run but not in debug mode!

If you use BoostPro (http://www.boostpro.com) install all versions multithreaded dll
to avoid the pb of compilation.

The safest but longest is to compile Qt yourself and Boost (good luck)


For the "ThirdParty libs"
Run CMake (gui)
Put the path to the root of CGoGN + / ThirdParty sources for
Put the path to the root of CGoGN + / ThirdParty / build to build in release
Put the path to the root of CGoGN + / ThirdParty / buildDebug to build in debug
Under windows the two versions are needed.

The following applies to two directories:
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables in functions that you want to compile (README.TXT for ThirdParty)
Edit CMAKE_PREFIX_PATH if necessary (see note dependencies)
Click again on Configure
Click on Generate
unknown's avatar
unknown committed
104 105
Go on visual, load and compile the 2 solutions
Do not forgot to generate the target INSTALL (once) 
Sylvain Thery's avatar
Sylvain Thery committed
106 107 108 109 110 111 112 113 114 115 116 117 118


For CGoGN:
Restart CMake
Put the path to the root of CGoGN for sources
Put the path to the root of CGoGN + / build (for example) to build
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables as ThirdParty (and CMAKE_PREFIX_PATH if necessary)
Click again on Configure
Click on Generate
Go to Visual and double-click on CGoGN.sln!

unknown's avatar
unknown committed
119 120 121 122
WARNING: Problem of linking with QGLViewer in Debug
If you compile an example (tuto1 & viewer) in Debug you have to modifiy
the project: Configuration properties -> Linking Editor -> Entries -> Supplementary dependencies
and change QGLViewer2.lib in QGLViewerd2.lib
Sylvain Thery's avatar
Sylvain Thery committed
123 124 125 126 127 128 129 130 131 132

For running executables you have to add the path to the dll dependencies in the variable
path environment (or copy the dll in a directory already in the path)


Note Dependencies:
If you want to use your own versions of dependency (Zlib / glew / Boost / Qt)
CMAKE_PREFIX_PATH change (see below)
Attention to Boost the prefix path does not work (use BOOST_ROOT and others if necessary)

unknown's avatar
unknown committed
133
Compiling 64-bit: TODO