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
- Ensure that prerequisites such as CMake have been installed.
- Download the GPSTk source distribution.
- Extract the GPSTk tarball. For example, using GNU tar
tar xvzf gpstk.tar.gz
- Open a command window (Command Prompt, Git Bash, or Windows PowerShell?) in which to build the Visual Studio Project file using CMake.
- Create a directory for your build. For example, change into the gpstk/ directory and type
- Change into the gpstk/build_VS2012 or directory; this will be where all of the build and project files will reside.
- 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:
- 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)
- Once CMake is finished, open Visual Studio 2012
- Left-click on File and choose "Open Project"
- In the File Explorer, navigate to the build folder and choose the VS project file, gpstk.sln.
- Wait until Visual Studio has completely loaded the project and finished indexing files.
- 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".
- To Build the GPSTk, right-click on "ALL_BUILD" and left-click on build.
- Once Visual Studio has finished building the code, verify that all projects were built and no errors occurred (should match the below image).
- To Install the GPSTK, navigate to "Solution Explorer" pane, right-click on "INSTALL" project and left-click on build.
- Once Visual Studio has finished installing the binaries, verify no errors occurred (should match the below image).
- 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)