r24 - 05 Dec 2013 - 17:55:34 - BryanParsonsYou are here: TWiki >  Documentation Web  >  BuildingGPSTkUnderUnix > BuildingGPSTkUnderWindows
The GPSTk is not supported under Microsoft Visual C++ Version 6.0, or earlier, because templates in classes are not supported. Currently, there is support for Microsoft Visual Studio Express 2012 32-/64-bit (Version 11, freely available here). While makefiles for Microsoft Visual C++ are not provided in the toolkit, CMake will generate Visual Studio Project files from existing code.

Building under Microsoft Visual Studio - CMake and Visual Studio IDE

  1. Ensure that prerequisites such as CMake have been installed.
  2. Download the GPSTk source distribution.
  3. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  4. Open a command window (Command Prompt, Git Bash, or Windows PowerShell?) in which to build the Visual Studio Project file using CMake.
  5. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS2012
  6. Change into the gpstk/build_VS2012 or directory; this will be where all of the build and project files will reside.
  7. If GPSTk will be installed as a system application in C:/Project Files or C:/Project Files (x86), only the CMake generator must be declared when building the project files:
    • For Visual Studio 2012 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 11" ../ or ../dev (if using Developer repo)
    • For Visual Studio 2012 IDE 64-bit, execute the following commands:
      cmake -G "Visual Studio 11 Win64" ../ or ../dev (if using Developer repo)
  8. If GPSTk will be installed to a custom directory, the target installation directory and CMake generator must be declared when building the project files:
    • For Visual Studio 2012 IDE 32-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 11" ../ or ../dev (if using Developer repo)
    • For Visual Studio 2012 IDE 64-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 11 Win64" ../ or ../dev (if using Developer repo)
  9. Once CMake is finished, open Visual Studio 2012
  10. Left-click on File and choose "Open Project"
  11. In the File Explorer, navigate to the build folder and choose the VS project file, gpstk.sln.
  12. Wait until Visual Studio has completely loaded the project and finished indexing files.
  13. Under the "Solution Explorer" pane, you will see the various projects that make up the GPSTk, including "ALL_BUILD", which will build all projects except for "INSTALL".
  14. To Build the GPSTk, right-click on "ALL_BUILD" and left-click on build.
  15. Once Visual Studio has finished building the code, verify that all projects were built and no errors occurred (should match the below image).
  16. To Install the GPSTK, navigate to "Solution Explorer" pane, right-click on "INSTALL" project and left-click on build.
  17. Once Visual Studio has finished installing the binaries, verify no errors occurred (should match the below image).
  18. To verify that the applications are working, open a command window (Command Prompt or Windows PowerShell?), navigate to the target installation folder, and run an application (timeconvert.exe in image below)
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r24 < r23 < r22 < r21 < r20 | More topic actions
 
WEBLOGOALT
This site is powered by the TWiki collaboration platformCopyright amp; by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback