Difference: BuildingGPSTkUnderWindows (1 vs. 26)

Revision 26
01 Aug 2014 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
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.
Line: 31 to 31
 

META FILEATTACHMENT attachment="open.png" attr="h" comment="" date="1378746928" name="open.png" path="open.png" size="8285" stream="open.png" user="Main.BryanParsons" version="3"
META FILEATTACHMENT attachment="project.png" attr="h" comment="" date="1378745748" name="project.png" path="project.png" size="24959" stream="project.png" user="Main.BryanParsons" version="1"
Deleted:
<
<
META FILEATTACHMENT attachment="allbuild.png" attr="h" comment="" date="1378746901" name="allbuild.png" path="allbuild.png" size="5145" stream="allbuild.png" user="Main.BryanParsons" version="2"
META FILEATTACHMENT attachment="build.png" attr="h" comment="" date="1378747049" name="build.png" path="build.png" size="11605" stream="build.png" user="Main.BryanParsons" version="2"
META FILEATTACHMENT attachment="buildcomplete.png" attr="h" comment="" date="1378745775" name="buildcomplete.png" path="buildcomplete.png" size="4376" stream="buildcomplete.png" user="Main.BryanParsons" version="1"
 
META FILEATTACHMENT attachment="install.png" attr="h" comment="" date="1378746916" name="install.png" path="install.png" size="14270" stream="install.png" user="Main.BryanParsons" version="2"
Deleted:
<
<
META FILEATTACHMENT attachment="installsuccess.png" attr="h" comment="" date="1378745795" name="installsuccess.png" path="installsuccess.png" size="8216" stream="installsuccess.png" user="Main.BryanParsons" version="1"
 
META FILEATTACHMENT attachment="installverified.png" attr="h" comment="" date="1378745806" name="installverified.png" path="installverified.png" size="24037" stream="installverified.png" user="Main.BryanParsons" version="1"
Added:
>
>
META FILEATTACHMENT attachment="release_pick.png" attr="h" comment="" date="1406902900" name="release_pick.png" path="release_pick.png" size="4661" stream="release_pick.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="release.png" attr="h" comment="" date="1406903067" name="release.png" path="release.png" size="3583" stream="release.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="build.png" attr="h" comment="" date="1406903367" name="build.png" path="build.png" size="11122" stream="build.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="allbuild.png" attr="h" comment="" date="1406903915" name="allbuild.png" path="allbuild.png" size="6813" stream="allbuild.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="buildcomplete.png" attr="h" comment="" date="1406903945" name="buildcomplete.png" path="buildcomplete.png" size="4327" stream="buildcomplete.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="installsuccess.png" attr="h" comment="" date="1406903973" name="installsuccess.png" path="installsuccess.png" size="7698" stream="installsuccess.png" user="Main.BryanParsons" version="1"
Revision 25
30 Jul 2014 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
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.
Line: 14 to 14
 
  1. 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)
Changed:
<
<
  1. If GPSTk will be installed to a custom directory, the target installation directory and CMake generator must be declared when building the project files:
>
>
  1. If GPSTk will be installed to a custom directory (Mind Spaces in Directory Name), 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)
  1. Once CMake is finished, open Visual Studio 2012
Revision 24
05 Dec 2013 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
Changed:
<
<
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 C++ 2010 32-bit (Version 10) and the 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.
>
>
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.
Deleted:
<
<
  1. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
 
  1. Download the GPSTk source distribution.
  2. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
Changed:
<
<
  1. Open a command window (Command Prompt or Windows PowerShell) in which to build the Visual Studio Project file using CMake.
  2. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS20XX
  3. Change into the gpstk/build_VS20XX or directory; this will be where all of the build and project files will reside.
>
>
  1. Open a command window (Command Prompt, Git Bash, or Windows PowerShell) in which to build the Visual Studio Project file using CMake.
  2. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS2012
  3. Change into the gpstk/build_VS2012 or directory; this will be where all of the build and project files will reside.
 
  1. 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:
Deleted:
<
<
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
 
    • 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)
  1. If GPSTk will be installed to a custom directory, the target installation directory and CMake generator must be declared when building the project files:
Deleted:
<
<
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
 
    • 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)
Changed:
<
<
  1. Once CMake is finished, open Visual Studio 2010 or 2012 (Latter shown in below images)
>
>
  1. Once CMake is finished, open Visual Studio 2012
 
  1. Left-click on File and choose "Open Project"
    %IMGLNK{"open.png"}%
  2. In the File Explorer, navigate to the build folder and choose the VS project file, gpstk.sln.
    %IMGLNK{"project.png"}%
  3. Wait until Visual Studio has completely loaded the project and finished indexing files.
Line: 31 to 28
 
  1. Once Visual Studio has finished installing the binaries, verify no errors occurred (should match the below image).
    %IMGLNK{"installsuccess.png"}%
  2. 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)
    %IMGLNK{"installverified.png"}%
Deleted:
<
<

Building under Microsoft Visual Studio - Jam and Command Line Tools

If you are building GPSTk under the Cygwin environment, then use the jam portion of BuildingGPSTkUnderUnix instructions.

Here are the 6 steps (followed by 5 notes) needed to build under Microsoft Visual C++.

  1. Ensure that prerequisites such as jam have been installed.
  2. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
  3. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio 2010 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2010. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
  4. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2010\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  5. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules(refer to Note2) file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2012 compiler:
          set MSVCNT=C:\MSVC2012\VC
          set MSCVER=1700
    
    or if you are using the 2010 compiler instead:
          set MSVCNT=C:\MSVC2010\VC
          set MSCVER=1600
    
    or if you are using the 2003 compiler instead:
          set MSVCNT=C:\MSVC2003\VC7
          set MSCVER=1300
    
    Of course you may have other install directories; this example uses C:\MSVC2012 for the 2012 tools, C:\MSVC2010 for the 2010 tools, and C:\MSVC2003 for the 2003 tools. Note the different subdirectories '\VC' and '\VC7'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1700, 1600, and 1300 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; i.e. for MS VC++ versions 6, 7 and 8, the major versions are 12, 13, and 14, respectively).
  6. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules(refer to Note2), and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work. To install, define the environment variable PREFIX to point to the root of the installation and then type jam install.
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2012.bat  Run from the command line
          REM    before using jam and the MS 2012 build tools.
          set MSVCNT=C:\MSVC2012\VC
          set MSCVER=1700
          REM This is a copy of VSVARS32.bat that came with MS VC++ 2012
          call VSVARS32_2012
          REM Move to my working directory
          cd C:\WorkingDirectory
    
    and
          REM Batch file go2010.bat  Run from the command line
          REM    before using jam and the MS 2010 build tools.
          set MSVCNT=C:\MSVC2010\VC
          set MSCVER=1600
          REM This is a copy of VSVARS32.bat that came with MS VC++.NET 2010
          call VSVARS32_2010
          REM Move to my working directory
          cd C:\WorkingDirectory
    
    With these batch files the whole process is a simple as (a) open command window, (b) type go2012 (or go2010), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
  • Note 2. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
  • Note 3. In any case, one ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course one may change this, or any compiler or linker options, by editing Jamrules.
  • Note 5. In the past, one problem using jam with MS compilers > VC++ 6.0 has been with missing libraries: advapi32.lib and kernel32.lib. This problem, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file(a 'Jamrules' file that contains all the defaults).
 

META FILEATTACHMENT attachment="open.png" attr="h" comment="" date="1378746928" name="open.png" path="open.png" size="8285" stream="open.png" user="Main.BryanParsons" version="3"
META FILEATTACHMENT attachment="project.png" attr="h" comment="" date="1378745748" name="project.png" path="project.png" size="24959" stream="project.png" user="Main.BryanParsons" version="1"
Revision 23
11 Oct 2013 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
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 C++ 2010 32-bit (Version 10) and the 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.
Line: 10 to 10
 
  1. Download the GPSTk source distribution.
  2. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  3. Open a command window (Command Prompt or Windows PowerShell) in which to build the Visual Studio Project file using CMake.
Changed:
<
<
  1. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS2012
  2. Change into the gpstk/build_VS2012 directory; this will be where all of the build and project files will reside.
>
>
  1. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS20XX
  2. Change into the gpstk/build_VS20XX or directory; this will be where all of the build and project files will reside.
 
  1. 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:
Changed:
<
<
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
      make
    • For Visual Studio 2012 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 11" ../ or ../dev (if using Developer repo)
      make
    • For Visual Studio 2012 IDE 64-bit, execute the following commands:
      cmake -G "Visual Studio 11 Win64" ../ or ../dev (if using Developer repo)
      make
>
>
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
    • 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)
 
  1. If GPSTk will be installed to a custom directory, the target installation directory and CMake generator must be declared when building the project files:
Changed:
<
<
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
      make
    • 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)
      make
    • 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)
      make
>
>
    • For Visual Studio 2010 IDE 32-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
    • 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)
 
  1. Once CMake is finished, open Visual Studio 2010 or 2012 (Latter shown in below images)
  2. Left-click on File and choose "Open Project"
    %IMGLNK{"open.png"}%
  3. In the File Explorer, navigate to the build folder and choose the VS project file, gpstk.sln.
    %IMGLNK{"project.png"}%
Revision 22
10 Oct 2013 - Main.FelipeNievinski
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
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 C++ 2010 32-bit (Version 10) and the 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.
Line: 11 to 11
 
  1. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  2. Open a command window (Command Prompt or Windows PowerShell) in which to build the Visual Studio Project file using CMake.
  3. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS2012
Changed:
<
<
  1. Change into the gpstk/build directory, this will be where all of the build and project files will reside.
>
>
  1. Change into the gpstk/build_VS2012 directory; this will be where all of the build and project files will reside.
 
  1. 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 2010 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
      make
    • For Visual Studio 2012 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 11" ../ or ../dev (if using Developer repo)
      make
Revision 21
09 Sep 2013 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
Changed:
<
<

Building under Microsoft Visual Studio

>
>
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 C++ 2010 32-bit (Version 10) and the 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.
 

Deleted:
<
<
If you are building GPSTk under the Cygwin environment, then use the jam portion of BuildingGPSTkUnderUnix instructions.
 
Changed:
<
<
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 C++ 2010 (Version 10) and the Microsoft Visual Studio Express 2012 (Version 11, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
>
>

Building under Microsoft Visual Studio - CMake and Visual Studio IDE

  1. Ensure that prerequisites such as CMake have been installed.
  2. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
  3. Download the GPSTk source distribution.
  4. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  5. Open a command window (Command Prompt or Windows PowerShell) in which to build the Visual Studio Project file using CMake.
  6. Create a directory for your build. For example, change into the gpstk/ directory and type
    mkdir build_VS2012
  7. Change into the gpstk/build directory, this will be where all of the build and project files will reside.
  8. 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 2010 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
      make
    • For Visual Studio 2012 IDE 32-bit, execute the following commands:
      cmake -G "Visual Studio 11" ../ or ../dev (if using Developer repo)
      make
    • For Visual Studio 2012 IDE 64-bit, execute the following commands:
      cmake -G "Visual Studio 11 Win64" ../ or ../dev (if using Developer repo)
      make
  9. 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 2010 IDE 32-bit, execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Visual Studio 10" ../ or ../dev (if using Developer repo)
      make
    • 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)
      make
    • 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)
      make
  10. Once CMake is finished, open Visual Studio 2010 or 2012 (Latter shown in below images)
  11. Left-click on File and choose "Open Project"
    %IMGLNK{"open.png"}%
  12. In the File Explorer, navigate to the build folder and choose the VS project file, gpstk.sln.
    %IMGLNK{"project.png"}%
  13. Wait until Visual Studio has completely loaded the project and finished indexing files.
  14. 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".
    %IMGLNK{"allbuild.png"}%
  15. To Build the GPSTk, right-click on "ALL_BUILD" and left-click on build.
    %IMGLNK{"build.png"}%
  16. Once Visual Studio has finished building the code, verify that all projects were built and no errors occurred (should match the below image).
    %IMGLNK{"buildcomplete.png"}%
  17. To Install the GPSTK, navigate to "Solution Explorer" pane, right-click on "INSTALL" project and left-click on build.
    %IMGLNK{"install.png"}%
  18. Once Visual Studio has finished installing the binaries, verify no errors occurred (should match the below image).
    %IMGLNK{"installsuccess.png"}%
  19. 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)
    %IMGLNK{"installverified.png"}%

Building under Microsoft Visual Studio - Jam and Command Line Tools

If you are building GPSTk under the Cygwin environment, then use the jam portion of BuildingGPSTkUnderUnix instructions.
 

Here are the 6 steps (followed by 5 notes) needed to build under Microsoft Visual C++.
Line: 48 to 77
 
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course one may change this, or any compiler or linker options, by editing Jamrules.
  • Note 5. In the past, one problem using jam with MS compilers > VC++ 6.0 has been with missing libraries: advapi32.lib and kernel32.lib. This problem, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file(a 'Jamrules' file that contains all the defaults).
Changed:
<
<
Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 20XX without using Jam:
  1. Download the project source files from Sourceforge and extract the tar files to a directory.
  2. In VS, create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
  3. Right click on the project name (this is the name that is specified during creation of the project) in the solution explorer and click on Add -> Existing Item and add ALL the files in the 'src' directory (under the extracted files location that is created in step 1) to the project.
  4. (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  5. Open the project property page (Right click on the project name in the solution explorer and select properties)
  6. In the opened properties dialog box, expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  7. Again, in the same project properties dialog box, expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
  8. Additional step for VS > 2008: in the same project properties dialog box, expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
  9. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project).
>
>
META FILEATTACHMENT attachment="open.png" attr="h" comment="" date="1378746928" name="open.png" path="open.png" size="8285" stream="open.png" user="Main.BryanParsons" version="3"
META FILEATTACHMENT attachment="project.png" attr="h" comment="" date="1378745748" name="project.png" path="project.png" size="24959" stream="project.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="allbuild.png" attr="h" comment="" date="1378746901" name="allbuild.png" path="allbuild.png" size="5145" stream="allbuild.png" user="Main.BryanParsons" version="2"
META FILEATTACHMENT attachment="build.png" attr="h" comment="" date="1378747049" name="build.png" path="build.png" size="11605" stream="build.png" user="Main.BryanParsons" version="2"
META FILEATTACHMENT attachment="buildcomplete.png" attr="h" comment="" date="1378745775" name="buildcomplete.png" path="buildcomplete.png" size="4376" stream="buildcomplete.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="install.png" attr="h" comment="" date="1378746916" name="install.png" path="install.png" size="14270" stream="install.png" user="Main.BryanParsons" version="2"
META FILEATTACHMENT attachment="installsuccess.png" attr="h" comment="" date="1378745795" name="installsuccess.png" path="installsuccess.png" size="8216" stream="installsuccess.png" user="Main.BryanParsons" version="1"
META FILEATTACHMENT attachment="installverified.png" attr="h" comment="" date="1378745806" name="installverified.png" path="installverified.png" size="24037" stream="installverified.png" user="Main.BryanParsons" version="1"
Revision 20
25 Jun 2013 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 6 to 6
 

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 C++ 2010 (Version 10) and the Microsoft Visual Studio Express 2012 (Version 11, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
Changed:
<
<
Here are the 5 steps (followed by 6 notes) needed to build under Microsoft Visual C++.
>
>
Here are the 6 steps (followed by 5 notes) needed to build under Microsoft Visual C++.
 

  1. Ensure that prerequisites such as jam have been installed.
  2. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
Revision 19
29 May 2013 - Main.BryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

If you are building GPSTk under the Cygwin environment, then use the jam portion of BuildingGPSTkUnderUnix instructions.
Changed:
<
<
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 C++ .NET 2003 (Version 7) and the Microsoft Visual C++ Express 2005 (Version 8, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
>
>
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 C++ 2010 (Version 10) and the Microsoft Visual Studio Express 2012 (Version 11, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
 

Here are the 5 steps (followed by 6 notes) needed to build under Microsoft Visual C++.

  1. Ensure that prerequisites such as jam have been installed.
  2. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
Changed:
<
<
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
  2. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2003\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  3. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules(refer to Note2) file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
    
    
>
>
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio 2010 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2010. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
  2. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2010\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  3. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules(refer to Note2) file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2012 compiler:
          set MSVCNT=C:\MSVC2012\VC
          set MSCVER=1700
    
    or if you are using the 2010 compiler instead:
          set MSVCNT=C:\MSVC2010\VC
          set MSCVER=1600
    
    or if you are using the 2003 compiler instead:
    
    
  set MSVCNT=C:\MSVC2003\VC7 set MSCVER=1300
Deleted:
<
<
or if you are using the 2005 compiler instead:
      set MSVCNT=C:\MSVC2005\VC
      set MSCVER=1400

 
Changed:
<
<
Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
>
>
Of course you may have other install directories; this example uses C:\MSVC2012 for the 2012 tools, C:\MSVC2010 for the 2010 tools, and C:\MSVC2003 for the 2003 tools. Note the different subdirectories '\VC' and '\VC7'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1700, 1600, and 1300 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; i.e. for MS VC++ versions 6, 7 and 8, the major versions are 12, 13, and 14, respectively).
 
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules(refer to Note2), and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work. To install, define the environment variable PREFIX to point to the root of the installation and then type jam install.
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
    
    
Changed:
<
<
REM Batch file go2005.bat Run from the command line REM before using jam and the MS 2005 build tools. set MSVCNT=C:\MSVC2005\VC set MSCVER=1400 REM This is a copy of VSVARS32.bat that came with MS VC++ 2005 call VSVARS32_2005
>
>
REM Batch file go2012.bat Run from the command line REM before using jam and the MS 2012 build tools. set MSVCNT=C:\MSVC2012\VC set MSCVER=1700 REM This is a copy of VSVARS32.bat that came with MS VC++ 2012 call VSVARS32_2012
  REM Move to my working directory cd C:\WorkingDirectory and

Changed:
<
<
REM Batch file go2003.bat Run from the command line REM before using jam and the MS 2003 build tools. set MSVCNT=C:\MSVC2003\VC7 set MSCVER=1300 REM This is a copy of VSVARS32.bat that came with MS VC++.NET 2003 call VSVARS32_2003
>
>
REM Batch file go2010.bat Run from the command line REM before using jam and the MS 2010 build tools. set MSVCNT=C:\MSVC2010\VC set MSCVER=1600 REM This is a copy of VSVARS32.bat that came with MS VC++.NET 2010 call VSVARS32_2010
  REM Move to my working directory cd C:\WorkingDirectory
Changed:
<
<
With these batch files the whole process is a simple as (a) open command window, (b) type go2005 (or go2003), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
>
>
With these batch files the whole process is a simple as (a) open command window, (b) type go2012 (or go2010), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
 
  • Note 2. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
  • Note 3. In any case, one ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course one may change this, or any compiler or linker options, by editing Jamrules.
Line: 53 to 56
 
  1. Open the project property page (Right click on the project name in the solution explorer and select properties)
  2. In the opened properties dialog box, expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  3. Again, in the same project properties dialog box, expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
Changed:
<
<
  1. Additional step for VS 2008: in the same project properties dialog box, expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
>
>
  1. Additional step for VS > 2008: in the same project properties dialog box, expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
 
  1. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project). \ No newline at end of file
Revision 18
28 May 2013 - Main.AdminBryanParsons
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 10 to 10
 

  1. Ensure that prerequisites such as jam have been installed.
  2. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
Changed:
<
<
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
>
>
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
 
  1. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2003\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
Changed:
<
<
  1. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
    
    
>
>
  1. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules(refer to Note2) file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
    
    
  set MSVCNT=C:\MSVC2003\VC7 set MSCVER=1300 or if you are using the 2005 compiler instead:

Line: 20 to 20
  set MSCVER=1400 Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
Changed:
<
<
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work. To install, define the environment variable PREFIX to point to the root of the installation and then type jam install.
>
>
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules(refer to Note2), and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work. To install, define the environment variable PREFIX to point to the root of the installation and then type jam install.
 
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2005.bat  Run from the command line
          REM    before using jam and the MS 2005 build tools.
    
    
Line: 41 to 41
  cd C:\WorkingDirectory With these batch files the whole process is a simple as (a) open command window, (b) type go2005 (or go2003), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
  • Note 2. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
Changed:
<
<
  • Note 3. In any case you ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course you may change this, or any compiler or linker options, by editing Jamrules.
  • Note 5. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.
>
>
  • Note 3. In any case, one ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course one may change this, or any compiler or linker options, by editing Jamrules.
  • Note 5. In the past, one problem using jam with MS compilers > VC++ 6.0 has been with missing libraries: advapi32.lib and kernel32.lib. This problem, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file(a 'Jamrules' file that contains all the defaults).
 
Changed:
<
<
Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 200X without using Jam:
>
>
Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 20XX without using Jam:
 
  1. Download the project source files from Sourceforge and extract the tar files to a directory.
Changed:
<
<
  1. In VS create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
>
>
  1. In VS, create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
 
  1. Right click on the project name (this is the name that is specified during creation of the project) in the solution explorer and click on Add -> Existing Item and add ALL the files in the 'src' directory (under the extracted files location that is created in step 1) to the project.
  2. (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  3. Open the project property page (Right click on the project name in the solution explorer and select properties)
Changed:
<
<
  1. In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  2. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
  3. Addition step for VS 2008, in the same project properties dialog box expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
>
>
  1. In the opened properties dialog box, expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  2. Again, in the same project properties dialog box, expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
  3. Additional step for VS 2008: in the same project properties dialog box, expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
 
  1. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project). \ No newline at end of file
Revision 17
27 Mar 2010 - Main.HaTran
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 53 to 53
 
  1. Open the project property page (Right click on the project name in the solution explorer and select properties)
  2. In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  3. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
Added:
>
>
  1. Addition step for VS 2008, in the same project properties dialog box expand Configuration Properties -> Linker tab and select General add the location of regex library directory to the Additional Library Directories And under Configuration Properties -> Linker tab -> Input add "regex.lib" in Additional Dependencies .
 
  1. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project).
Revision 16
16 Jun 2009 - Main.ClarkHughes
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Revision 15
12 May 2009 - Main.AllenFarris
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 52 to 52
 
  1. (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  2. Open the project property page (Right click on the project name in the solution explorer and select properties)
  3. In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
Changed:
<
<
  1. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >)
>
>
  1. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >) Also, add the location of the regex library that you have installed. This should contain a file regex.h.
 
  1. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project). \ No newline at end of file
Revision 14
23 Oct 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 53 to 53
 
  1. Open the project property page (Right click on the project name in the solution explorer and select properties)
  2. In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  3. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >)
Deleted:
<
<
  1. Open the properties page of 'regex.c' file. In the solution explorer right click on 'regex.c' file (which must be located under 'Source File' of solution explorer) and select Properties.
  2. In the property pages dialog expand C/C++ tab and select the Command Line. Copy the following to the Additional Options text box:
    -D__STDC__ -D_POSIX_SOURCE -DREGEX_MALLOC -DSTDC_HEADERS
 
  1. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project). \ No newline at end of file
Revision 13
21 May 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Changed:
<
<
If you are building GPSTk under the Cygwin environment, then use the BuildingGPSTkUnderUnix instructions.
>
>
If you are building GPSTk under the Cygwin environment, then use the jam portion of BuildingGPSTkUnderUnix instructions.
 

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 C++ .NET 2003 (Version 7) and the Microsoft Visual C++ Express 2005 (Version 8, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
Revision 12
15 May 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 40 to 40
  REM Move to my working directory cd C:\WorkingDirectory With these batch files the whole process is a simple as (a) open command window, (b) type go2005 (or go2003), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
Changed:
<
<
  • Note 2. In the past we have required the command
    set NEED_REGEX=yes
    under Windows, in order to ensure that src\regex.c gets compiled. However this is handled automatically within the Jamrules file and so it is not necessary to type this on the command line.
  • Note 3. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
  • Note 4. In any case you ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 5. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course you may change this, or any compiler or linker options, by editing Jamrules.
  • Note 6. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.
>
>
  • Note 2. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
  • Note 3. In any case you ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 4. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course you may change this, or any compiler or linker options, by editing Jamrules.
  • Note 5. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.
 

Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 200X without using Jam:
  1. Download the project source files from Sourceforge and extract the tar files to a directory.
Revision 11
14 May 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 9 to 9
  Here are the 5 steps (followed by 6 notes) needed to build under Microsoft Visual C++.

  1. Ensure that prerequisites such as jam have been installed.
Added:
>
>
  1. Ensure that there is a system regular expression library installed. See InstallingRegexSupportForVisualCPP.
 
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
  2. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2003\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  3. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
    
    
Revision 10
03 Feb 2008 - Main.YigiterYuksel
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 46 to 46
 
  • Note 6. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.

Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 200X without using Jam:
Changed:
<
<
  • Download the project source files from Sourceforge and extract the tar files to a directory.
  • In VS create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
  • Right click on the project name (this is the name that is specified during creation of the project) in the solution explorer and click on Add -> _Existing Item_' and add ALL the files in the 'src' directory (under the extracted files location that is created in step 1) to the project.
  • (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  • Open the project property page (Right click on the project name in the solution explorer and select properties)
  • In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
-D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  • Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >)
  • Open the properties page of 'regex.c' file. In the solution explorer right click on 'regex.c' file (which must be located under 'Source File' of solution explorer) and select Properties.
  • In the property pages dialog expand C/C++ tab and select the Command Line. Copy the following to the Additional Options text box:
-D__STDC__ -D_POSIX_SOURCE -DREGEX_MALLOC -DSTDC_HEADERS
  • That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.
>
>
  1. Download the project source files from Sourceforge and extract the tar files to a directory.
  2. In VS create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
  3. Right click on the project name (this is the name that is specified during creation of the project) in the solution explorer and click on Add -> Existing Item and add ALL the files in the 'src' directory (under the extracted files location that is created in step 1) to the project.
  4. (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  5. Open the project property page (Right click on the project name in the solution explorer and select properties)
  6. In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
    -D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  7. Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >)
  8. Open the properties page of 'regex.c' file. In the solution explorer right click on 'regex.c' file (which must be located under 'Source File' of solution explorer) and select Properties.
  9. In the property pages dialog expand C/C++ tab and select the Command Line. Copy the following to the Additional Options text box:
    -D__STDC__ -D_POSIX_SOURCE -DREGEX_MALLOC -DSTDC_HEADERS
  10. That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.
 

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project).
Revision 9
03 Feb 2008 - Main.YigiterYuksel
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 44 to 44
 
  • Note 4. In any case you ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 5. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course you may change this, or any compiler or linker options, by editing Jamrules.
  • Note 6. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.
Added:
>
>

Apart from the instructions described above, here is another receipt for using GPSTk core libraries in Visual Studio 200X without using Jam:
  • Download the project source files from Sourceforge and extract the tar files to a directory.
  • In VS create a new Win32 console application project. (In order to avoid using precompiled headers, you must select 'Empty Project' option in the application wizard dialog)
  • Right click on the project name (this is the name that is specified during creation of the project) in the solution explorer and click on Add -> _Existing Item_' and add ALL the files in the 'src' directory (under the extracted files location that is created in step 1) to the project.
  • (Again) Right click on project name in the solution explorer and click on Add -> Existing Item and add only 'example1.cpp' which is located under the examples directory.
  • Open the project property page (Right click on the project name in the solution explorer and select properties)
  • In the opened properties dialog expand the Configuration Properties -> C/C++ tab and select Command Line. Copy the following line to the Additional Options text box:
-D_CRT_SECURE_NO_DEPRECATE -wd4274 -DWIN32 /EHsc /GR -wd4290 -wd4267
  • Again in the same project properties dialog box expand Configuration Properties -> C/C++ tab and select General. Add the location of 'src' directory to the Additional Include Directories. (This is necessary because, unfortunately, some non-system header files in the source files were included using < >)
  • Open the properties page of 'regex.c' file. In the solution explorer right click on 'regex.c' file (which must be located under 'Source File' of solution explorer) and select Properties.
  • In the property pages dialog expand C/C++ tab and select the Command Line. Copy the following to the Additional Options text box:
-D__STDC__ -D_POSIX_SOURCE -DREGEX_MALLOC -DSTDC_HEADERS
  • That is all. Build the program (building takes some time) and run. You will see the output of example1 in the output window.

You can also build a GPSTk library in the same manner to add all the core functions to your custom programs (but this time select 'Static Library' under the 'Application Setting' in the 'Application Wizard' to build the project as a library and of course do not add any example to the project).
Revision 8
02 Feb 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 19 to 19
  set MSCVER=1400 Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
Changed:
<
<
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
>
>
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work. To install, define the environment variable PREFIX to point to the root of the installation and then type jam install.
 
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2005.bat  Run from the command line
          REM    before using jam and the MS 2005 build tools.
    
    
Revision 7
21 Jan 2008 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

If you are building GPSTk under the Cygwin environment, then use the BuildingGPSTkUnderUnix instructions.
Changed:
<
<
The GPSTk is not supported under Microsoft Visual C++ ver 6.0, or earlier, because templates in classes are not supported. Currently there is support for MS VC++ .NET 2003 (ver 7) and the Express edition of MS VC++ 2005 (ver 8, freely available here). Makefiles for MS VC++ are not provided in the toolkit, however note that the MS VC++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
>
>
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 C++ .NET 2003 (Version 7) and the Microsoft Visual C++ Express 2005 (Version 8, freely available here). Makefiles for Microsoft Visual C++ are not provided in the toolkit, however note that the Visual C++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.
 
Changed:
<
<
Here are the 5 steps (followed by 6 notes) needed to build under MS VC++.
>
>
Here are the 5 steps (followed by 6 notes) needed to build under Microsoft Visual C++.
 

  1. Ensure that prerequisites such as jam have been installed.
  2. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
Revision 6
14 Nov 2007 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 9 to 9
  Here are the 5 steps (followed by 6 notes) needed to build under MS VC++.

  1. Ensure that prerequisites such as jam have been installed.
Changed:
<
<
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems arise here when the installation directory has whitespace in it. Thus it is best to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
>
>
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems have arisen here when the installation directory has whitespace in it. It has worked correctly with Visual Studio Express 2005 with white space. You could also try quoting the string with whitespace. Another option is to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
 
  1. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2003\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  2. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
          set MSVCNT=C:\MSVC2003\VC7
    
    
Revision 5
20 Oct 2007 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 19 to 19
  set MSCVER=1400 Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
Changed:
<
<
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion)of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
>
>
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion) or the \gpstk directory (if using the tarball) of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
 
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2005.bat  Run from the command line
          REM    before using jam and the MS 2005 build tools.
    
    
Revision 4
19 Oct 2007 - Main.RickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio

Line: 19 to 19
  set MSCVER=1400 Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
Changed:
<
<
  1. At this point, change directory (cd) to your copy of the \dev directory of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
>
>
  1. At this point, change directory (cd) to your copy of the \dev directory (if using Subversion)of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
 
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2005.bat  Run from the command line
          REM    before using jam and the MS 2005 build tools.
    
    
Revision 3
09 Apr 2007 - Main.BrianTolman
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"
Changed:
<
<

Building under Microsoft Visual Studio .NET 2003

>
>

Building under Microsoft Visual Studio

 

If you are building GPSTk under the Cygwin environment, then use the BuildingGPSTkUnderUnix instructions.
Changed:
<
<
The GPSTk is not supported under Microsoft Visual C++ 6.0, or earlier, mainly because templates in classes are not supported. Currently there are no Makefiles for MSVS, so you must use jam to build the GPSTk on the command line.
>
>
The GPSTk is not supported under Microsoft Visual C++ ver 6.0, or earlier, because templates in classes are not supported. Currently there is support for MS VC++ .NET 2003 (ver 7) and the Express edition of MS VC++ 2005 (ver 8, freely available here). Makefiles for MS VC++ are not provided in the toolkit, however note that the MS VC++ IDE is able to import existing code, and so makefiles could probably be generated via the IDE. The GPSTk supports using jam and the command line tools to build.

Here are the 5 steps (followed by 6 notes) needed to build under MS VC++.
 
Deleted:
<
<
Here are the steps we have used to build under MSVS.NET 2003.
 
  1. Ensure that prerequisites such as jam have been installed.
Changed:
<
<
  1. You may have to reinstall the compiler to build with GPSTk. In order for Jam to work under Windows, the MSVS command line tools (compiler and linker) must be installed in a directory without whitespace in it. Thus the default installation directory (\Program Files\...), for example, will cause Jam to fail. Sorry, you'll have to re-install in another directory; for example we used C:\MSVS2003. Also, if the VCVARS32.BAT batch file was not installed, this option can be chosen during reinstallation.
  2. Open a command window and run the VCVARS32.BAT batch file before running Jam.
  3. Jam requires that two other environment variables be set. Using the command line:
    set MSVCNT=C:\MSVS2003\VC7
    set NEED_REGEX=yes
    The directory on the right of the '=' is the directory where the command line tools are installed (it will have subdirectories bin,lib,include, etc.); this tells Jam where the compiler and linker are. NEED_REGEX tells Jam to compile regex.c into the library, as it is not part of the MSVS libraries.
  4. Ensure the Jam executable for Windows is in the path. Install the GPSTk tarball and change to the root directory of the GPSTk -- the file 'Jamrules' should be here. Then execute jam.
    cd c:\gpstk\dev
    jam
  5. To build the library documentation using doxygen:
    doxygen 
>
>
  1. Jam must be told where to find the command line tools (compiler and linker). It does this through the environment variable MSVCNT; see step 3. Problems arise here when the installation directory has whitespace in it. Thus it is best to install the MS VC++ tools into a directory with no whitespace; for example C:\MSVC2003. Some have said that jam can be made to work using the "DOS 8.3" version of the path, but this has not been tested.
  2. Open a command window in which to build the toolkit. The MS VC++ tools require that appropriate paths be defined before the command line tools will work. MS provides a batch file that sets the PATH and other environment variables; it is called VSVARS32.bat and is found in the directory C:\MSVC2003\Common7\Tools. Don't confuse this with VCVARS32.bat. After you have run VSVARS32, you should be able to type
    cl
    at the command prompt and get the MS compiler.
  3. Jam also relies on environment variables, two of them, in order to run. The jam executable looks at the variable MSVCNT to find the path of the command line tools. Also, the Jamrules file has been set up to look at the variable MSCVER to determine which set of compiler and linker options is to be used. Thus for the 2003 compiler:
          set MSVCNT=C:\MSVC2003\VC7
          set MSCVER=1300
    
    or if you are using the 2005 compiler instead:
          set MSVCNT=C:\MSVC2005\VC
          set MSCVER=1400
    
    Of course you may have other install directories; this example uses C:\MSVC2003 for the 2003 tools and C:\MSVC2005 for the 2005 tools. Note the different subdirectories '\VC7' and '\VC'; this is an MS thing, these are the directories where the \bin, \lib, and \include directories are found. (The values 1300 and 1400 were chosen because all MS compilers define the macro _MSC_VER as a float number of the form 'MMmm.mm' where MM is the major version, and mm.mm is the minor version number; in MS VC++ versions 6, 7 and 8 the major versions are 12, 13, and 14 respectively).
  4. At this point, change directory (cd) to your copy of the \dev directory of the toolkit, i.e. the directory that contains Jamrules, and simply type
    jam
    to build the entire toolkit. Jam will tell you which compiler you are using, and then get to work.
  • Note 1. You could install BOTH MS compilers, in different directories, and then put all this setup into batch files that allow you to run either one independently. For example:
          REM Batch file go2005.bat  Run from the command line
          REM    before using jam and the MS 2005 build tools.
          set MSVCNT=C:\MSVC2005\VC
          set MSCVER=1400
          REM This is a copy of VSVARS32.bat that came with MS VC++ 2005
          call VSVARS32_2005
          REM Move to my working directory
          cd C:\WorkingDirectory
    
    and
          REM Batch file go2003.bat  Run from the command line
          REM    before using jam and the MS 2003 build tools.
          set MSVCNT=C:\MSVC2003\VC7
          set MSCVER=1300
          REM This is a copy of VSVARS32.bat that came with MS VC++.NET 2003
          call VSVARS32_2003
          REM Move to my working directory
          cd C:\WorkingDirectory
    
    With these batch files the whole process is a simple as (a) open command window, (b) type go2005 (or go2003), (c) type jam. Type 'jam clean' to delete all the object (.obj) and executable (.exe) files.
  • Note 2. In the past we have required the command
    set NEED_REGEX=yes
    under Windows, in order to ensure that src\regex.c gets compiled. However this is handled automatically within the Jamrules file and so it is not necessary to type this on the command line.
  • Note 3. The Jamrules file is where the MSCVER variable is required (unlike the MSVCNT variable, which the jam executable requires). If you use only one compiler exclusively, you might edit the Jamrules file and remove this version dependency; then you would not need MSCVER at all.
  • Note 4. In any case you ought to look at the Jamrules file; look for $(NT), which the Windows executable jam.exe defines, for items relevant to Windows. C++FLAGS contains C++ compiler options, CCFLAGS contains C compiler options (but note that CCFLAGS is changed in \src\Jamfile for compiling regex.c), LINKFLAGS are linker options, and LINKLIBS are extra libraries included in the link.
  • Note 5. We have found that optimization is a practical necessity in building with these compilers. The option /O2 (that's capital 'oh' not 'zero') seems to be best for speed. Jamrules now includes /O2 in both versions of the MS compilers. Of course you may change this, or any compiler or linker options, by editing Jamrules.
  • Note 6. In the past one of the problems in using jam with the MS compilers beyond version 6.0 has been that the libraries advapi32.lib and kernel32.lib seemed to be missing. This, however, comes from the jam executable, not from MS. These libraries are required, and provided, in MS VC++ 6.0, and this is the default for the jam executable. Jam.exe does this by defining the default LINKLIBS to include these libraries. Since they are not required for later versions, Jamrules now redefines LINKLIBS to be empty. If you want to understand the defaults in jam.exe, go to the jam website and find the Jambase file - it is a 'Jamrules' file that contains all the defaults.
Revision 2
18 Dec 2006 - Main.AdminRickMach
Line: 1 to 1
 
META TOPICPARENT name="BuildingGPSTkUnderUnix"

Building under Microsoft Visual Studio .NET 2003

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback