Difference between revisions of "BuildWindowsCore"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(often appeared errors)
(Building the CalVR-Core for Windows (!!!under construction!!!))
Line 1: Line 1:
==Building the CalVR-Core for Windows (!!!under construction!!!)==
+
=Building the CalVR-Core under Windows=
  
 +
The following third-party libraries are needed for the installation:
  
There are some requirement that has to be fullfilled for successfully building the CalVR core.  
+
* [http://www.cmake.org/download/ Cmake GUI] (version 2.8.12.2 has been tested)
The following software is needed for the installation:
+
* [http://www.openscenegraph.org/index.php/download-section/stable-releases OpenSceneGraph] (version 3.2.0 has been tested)
 +
* Visual Studio (version 2012 has been tested)
  
 +
The installation under Windows can be tricky, especially because of the different versions of the software. So there is no guarantee that the version we use will work on other systems.
  
*[http://www.cmake.org/download/ Cmake GUI] (version 2.8.12.2 is used in the test-environment)
+
==Building OpenSceneGraph==
*[http://www.openscenegraph.org/index.php/download-section/stable-releases OpenSceneGraph] (version 3.2.0 is used in the test-environment)
+
*Visual Studio (version 2012 is used in the test-environment)
+
  
The installation under Windows can be tricky, especially because of the different versions of the software. So there is no garantee that the version we use also work on other systems.
+
After downloading the OSG source code, extract the files in a folder under your main directory (normally your C:\ drive). Now run the Cmake GUI and enter the directories '''"Where is the source code"''' and '''"Where to build the binaries"'''. You can also drag and drop the Cmakelists.txt file that is located in OSG's root directory. Click on "configure".
  
 +
Now you can customize your build. Red lines indicate new variables that can be set or modified. Most of them are optional and some are already set.
  
===building OpenSceneGraph===
+
Make sure that the following variables are set correctly, the path given below is an example:
 
+
After downloading the OSG source code, extract the files in a folder under your main directory (in general your C:\ drive). Now start Cmake GUI and enter the directories '''"Where is the source code"''' and '''"Where to build the binaries"'''. You can also drag and drop the Cmakelists.txt file that is located in the OSG-root directory. Click on "configure".
+
Now you can costomize your build. Red lines indicate new variables that can be set or modified. Most of them are optional and some are already set.
+
Pay attention to the following variables that they are set correctly:
+
  
 
<pre>
 
<pre>
Line 26: Line 24:
 
</pre>
 
</pre>
  
After setting everything to your needs press again "configure" and all red lines should disappear. In case there are still some unknown variables left, correct them or leave it as it is and press "configure" again.
+
After setting everything to your needs press 'c' for configure again and all red lines should disappear. In case there are still unknown variables, correct them or leave them as they are and press 'c' again.  
Now you can generate the solution file by pressing "generate".
+
If everything goes right, you should now see a OpenScenegraph.sln file in the folder you entered in "Where to build binaries". Open it in Visual Studio and select your build type (Debug, Release, RelWithDebugInfo, MinSizeRel). Click on '''build''' --> '''build solution'''. This starts the build process which can take several minutes. In general everything should build correct, so that you are able to right click on the "INSTALL" project and select "build". After the build is finished you can check your installation by entering the following command in a command prompt:
+
  
<pre>
+
Now you can generate the solution file by pressing 'g' for "generate".
osgversion
+
</pre>
+
  
It is possible that there will be an error while building the "INSTALL" project where the compiler couldn't create a file under C:\Program files(x86)\... . This happens because you need administrative rights to create a file there. It can be solved by adding the directory manually.
+
If everything goes well, you should now see the OpenScenegraph.sln file in the folder you entered in "Where to build binaries". Open it in Visual Studio and select your preferred build type - use Debug if you will be developing your own CalVR apps, otherwise Release. Click on '''build''' --> '''build solution'''. This starts the build process, which can take several minutes. If everything builds correctly, you are now able to right click on the "INSTALL" project and select "build". After the build is finished you can check your installation by entering the following command in a command prompt:
  
 +
<tt>osgversion</tt>
  
 +
If building the "INSTALL" project throws an error, it could be that the compiler couldn't create a file under C:\Program files(x86)\... . This happens because you need to be an Administrator to create a file there. You can solve this problem by adding the directory manually.
  
===building CalVR Core===
+
==Building CalVR's Core==
  
To avoid errors while building CalVR add a new folder under the C:\ - directory where you can copy the source code. Similar to the OSG-Build open the Cmake-GUI and drag and drop the Cmakelists -file to set the "Where to find source" and "Where to build the binaries" directories. Press Configure and set the variables to your needs. Press again "configure" to set the changes and afterwards press "generate". Now open the generated solution file and build it. If the build is successful the "INSTALL" project can be build. After all there should be an executable called "CalVR.exe".
+
To avoid errors while building CalVR add a new folder under the C:\ directory where you put the source code. Similar to the OSG build, open the Cmake GUI and drag and drop the Cmakelists-file on it to set the "Where to find source" and "Where to build the binaries" directories. Press 'c' and set the variables as needed. Press 'c' again to apply the changes and then press 'g'. Now open the generated solution file and build it. If the build is successful the "INSTALL" project can be build. After all is said and done there should be an executable called "CalVR.exe".
Also set the following environment variables:
+
 
 +
Before you run CalVR, make sure you set the following environment variables:
  
 
<pre>
 
<pre>
Line 49: Line 46:
 
</pre>
 
</pre>
  
Before starting CalVR the Configuration file must be edited. for more detailed informations about the config-file see: [[CalVR Config File]]
+
Before starting CalVR, its XML configuration file must be edited. For more detailed information about the config file see: [[CalVR Config File]]
If the error occur that a header-file could not be found , go to properties under the project menue. There gor to VC++ - Directories and control the Include-directory path.
+
 
 +
If you get an error about a header file that could not be found, go to Properties in the project menu. There go to "VC++ - Directories" and adjust the path for the Include directory.
  
 
==errors that can occur==
 
==errors that can occur==

Revision as of 22:36, 6 December 2014

Contents

Building the CalVR-Core under Windows

The following third-party libraries are needed for the installation:

  • Cmake GUI (version 2.8.12.2 has been tested)
  • OpenSceneGraph (version 3.2.0 has been tested)
  • Visual Studio (version 2012 has been tested)

The installation under Windows can be tricky, especially because of the different versions of the software. So there is no guarantee that the version we use will work on other systems.

Building OpenSceneGraph

After downloading the OSG source code, extract the files in a folder under your main directory (normally your C:\ drive). Now run the Cmake GUI and enter the directories "Where is the source code" and "Where to build the binaries". You can also drag and drop the Cmakelists.txt file that is located in OSG's root directory. Click on "configure".

Now you can customize your build. Red lines indicate new variables that can be set or modified. Most of them are optional and some are already set.

Make sure that the following variables are set correctly, the path given below is an example:

- OSG_ROOT            C:\osg\OpenSceneGraph-3.2.0
- OSG_INCLUDE_PATH    C:\osg\OpenSceneGraph-3.2.0\include
- OSG_BIN_PATH        C:\osg\OpenSceneGraph-3.2.0\bin
- OSG_LIB_PATH        C:\osg\OpenSceneGraph-3.2.0\lib

After setting everything to your needs press 'c' for configure again and all red lines should disappear. In case there are still unknown variables, correct them or leave them as they are and press 'c' again.

Now you can generate the solution file by pressing 'g' for "generate".

If everything goes well, you should now see the OpenScenegraph.sln file in the folder you entered in "Where to build binaries". Open it in Visual Studio and select your preferred build type - use Debug if you will be developing your own CalVR apps, otherwise Release. Click on build --> build solution. This starts the build process, which can take several minutes. If everything builds correctly, you are now able to right click on the "INSTALL" project and select "build". After the build is finished you can check your installation by entering the following command in a command prompt:

osgversion

If building the "INSTALL" project throws an error, it could be that the compiler couldn't create a file under C:\Program files(x86)\... . This happens because you need to be an Administrator to create a file there. You can solve this problem by adding the directory manually.

Building CalVR's Core

To avoid errors while building CalVR add a new folder under the C:\ directory where you put the source code. Similar to the OSG build, open the Cmake GUI and drag and drop the Cmakelists-file on it to set the "Where to find source" and "Where to build the binaries" directories. Press 'c' and set the variables as needed. Press 'c' again to apply the changes and then press 'g'. Now open the generated solution file and build it. If the build is successful the "INSTALL" project can be build. After all is said and done there should be an executable called "CalVR.exe".

Before you run CalVR, make sure you set the following environment variables:

- CALVR_HOME           C:\CalVR
- CALVR_CONFIG_DIR     C:\CalVR\config
- CALVR_CONFIG_FILE    config.xml

Before starting CalVR, its XML configuration file must be edited. For more detailed information about the config file see: CalVR Config File

If you get an error about a header file that could not be found, go to Properties in the project menu. There go to "VC++ - Directories" and adjust the path for the Include directory.

errors that can occur

The most often errors that happen during build are linker errors where the compiler can't find the specified file. Most of them can be solved by adding the path where the missing file is stored, in the project properties. Another error stated that the Module machine type 'x64' conflicts with target machine type 'X86' or the other way around. If you get this error you should check the build configuration under build --> configuration.