Could anyone help to give the detail instructions how to install CMake on Windows 7 and how to build GPSTk on visual Studio Pro 2010?

I have extracted both cmake-3.0.2 and gpstk-2.4.src under d:/Program Files/GPS Toolkit.

Then I made build_VS2010 folder gpstk-2.4.src.

Then I tried to run: $ cmake -DCMAKE_ISNTALL_PREFIX:PATH=/cygdrive/d/Program Files/GPS Toolkit/gpstk-2.4.src/build_VS2010 -G "Visual Studio 10 Win64" ../dev CMake Error: Could not create named generator Visual Studio 10 Win64

Seems I have the CMAKE and VS2010 path setting issues. Hope I can get your detail instructions for building GPSTk on Windows 7 & VS2010.

-- JizhongChen - 18 Sep 2014


ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

after installing windows cmake correctly, I got cmake -D(PATH) -G "Visual Studio 10 Win64" ../dev run but the build failed for CMake error at C:/Program File (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/x86_amd64/c1.exe" is not able to complete a simple test program.

-- JizhongChen - 22 Sep 2014

Hi Jizhong,

I'm sorry to see you are having issues with the GPS Toolkit.

When looking at your initial command, the word "INSTALL" is misspelled in the CMAKE command-line variable. Just wanted to highlight that, in case it is causing you some issue.

Since you are not using the developer's repository, but the sourcecode from Sourceforge, you will want to use ../ instead of ../dev at the end in order to properly point CMake to correct CMakeLists.txt file.

Based on your above command, you should be using the following:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/cygdrive/d/Program Files/GPS Toolkit/gpstk-2.4.src/build_VS2010 -G "Visual Studio 10 Win64" ../

Unfortunately, as both Cygwin and VS2010 are not supported platforms, you may encounter bugs that we are not aware of.

Let me know if that works for you, and if not, we can continue to work through the issue.

Thanks for your interest in the GPS Toolkit

-- BryanParsons - 22 Sep 2014

Hi Bryan:

Thanks for your response by pointing out my mistake on command spelling.

I have done some further exercises today.

Computer info: Windows 7 OS, 64-bit, Service Pack 1 MS Visual studio 2010, Version 10.0.30319.1 RTMRel.

I downloaded and installed: gpstk-2.4.win64 (38.3Mb) cmake-3.0.2-win32-x86 (11Mb)

Ran under D:\GPS Toolkit\gpstk-2.4.src\build_VS2010: cmake –DCMAKE_INSTALL_PREFIX:PATH=”D:\GPS Toolkit\gpstk-2.4.src\build_VS2010” –G “Visual Studio 10 Win64” ../dev

Got the error message: … CMake failed for error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler “C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe” is not able to compile a simple test program.

Could you please help to verify the downloaded gpskt and cmake files are correct? I am guessing that cmake-3.0.2-win32-x86 is for 32 Bit. It may be wrong for Win64 build. But I could not identify where to find cmake for win64.

Thanks and looking forward to your help again.


-- JizhongChen - 22 Sep 2014

Hi Jizhong,

Question: Did you download the gpstk-2.4.win64 executable file, or the gpstk-2.4.src tar ball? Also, is your intent to build the source code or just install and utilize the GPSTk binaries (Applications and Library)?


-- BryanParsons - 23 Sep 2014

Hi Bryan:

I intend to build the GPSTk source codes on Windows using Visual studio 2010. I followed your GPSTk build steps for windows:

Step 1: install cmake using cmake-3.0.2-win32-x86 (11Mb); Step 2: downloaded dgpstk-2.4.src.tar (68Mb); Step 3: Extracted the tar ball by tar xvzf gpstk-2.4.src.tar.gz under D:\GPS Toolkit using cgywin (I am thinking it is only way to tar under Cygwin or centOS/Linux). Step 4: Open a MSDOS command window and change into D:\GPS Toolkit\gpstk-2.4.src directory; Step 5: create build_2010 directory under D:\GPS Toolkit\gpstk-2.4.src Step 6: Change into D:\GPS Toolkit\gpstk-2.4.src\build_VS2010. Step 7: Run: cmake –DCMAKE_INSTALL_PREFIX:PATH=”D:\GPS Toolkit\gpstk-2.4.src\build_VS2010” –G “Visual Studio 10 Win64” ../dev Got the cmake error as described in my previous message.

Could you please help to check my steps. I can download/install Visual Studio 2012 Express to repeat the same steps if these steps are correct. Looking forward to your response again. Thanks, Jizhong

-- JizhongChen - 23 Sep 2014


The Cmake version (x86) will work with both x86 and x64, so that is not an issue.

I remember running into this issue before, and it happened after downloading and installing VS 2012, which broke my VS 2010. Basically, VS 2010 is not happy with the version of .NET Framework installed on your PC.

This Stack Overflow thread should help resolve this issue:

The main takeaway should be "Uninstall .NET Framework 4.5 from your system; then download .NET Framework 4.0 and install it; this should fix your problem."

If this doesn't work, then one of the file privilege changes described in the thread should help.

Let me know if this resolves your issue. If not, you could install VS 2012 and see if it works on that, and we can go from there.

Thanks again for your interest in the GPS Toolkit.

-- BryanParsons - 24 Sep 2014

Hi Bryan:

Thanks for your suggestions. After I installed (1) Microsoft Windows SDK for Windows 7 and .NET Framework 4; and (2)Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1, I did get go through the cmake and arrived the Step 14 of To Build the GPSTk but failed at Step 15. ALL_BUILD has 54 failed.

The first error occurs at: 1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------ ... 1>Building with tools version "4.0". 1>Target "_CheckForInvalidConfigurationAndPlatform: (TargetId:2)" in file "C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "D:\Program Files\GPS Toolkit\gpstk-2.4.src\build_VS2010\ZERO_CHECK.vcxproj" (entry point): 1>Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' = 'true' ) was evaluated as ( '' = 'true' ). 1>Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' = 'true' ) was evaluated as ( '' = 'true' )


1>Done executing task "Message". (TaskId:3) 1>Task "Error" skipped, due to false condition; ('$(OutDir)' = '' and HasTrailingSlash('$(OutDir)')) was evaluated as ('D:\Program Files\GPS Toolkit\gpstk-2.4.src\build_VS2010\x64\Release\' = '' and HasTrailingSlash('D:\Program Files\GPS Toolkit\gpstk-2.4.src\build_VS2010\x64\Release\')).

I did not uninstall .NET Framework 4.5 when I installed 4.0. I may try to clean up system and redo again. If you have any clues, please advise. Thanks a lot, Jizhong

-- JizhongChen - 25 Sep 2014

Update: Now I got ZERO_CHECK succeeded: 1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------ 1>Build started 9/25/2014 9:29:27 AM. 1>InitializeBuildStatus: 1> Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>FinalizeBuildStatus: 1> Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild". 1> Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.lastbuildstate". 1> 1>Build succeeded.

But all others failed for:2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory

Maybe I really need to follow the install order: 1. Visual Studio 2010 2. Windows SDK 7.1 3. Visual Studio 2010 SP1 4. Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

-- JizhongChen - 25 Sep 2014

Update: After re-installing SP1, I got 12 Builds succeeded. The error message is: 5>gpstk.lib(SP3Data.obj) : error LNK2019: unresolved external symbol __imp_regexec referenced in function "class std::basic_string<char,struct std::char_traits,...

-- JizhongChen - 25 Sep 2014

Hi Bryan: After re-installed SP1 and SP1 Compiler Update again, I got some projects succeeded including gpstk project but most are fails. I am working on project property settings including regex path settings. Jizhong

-- JizhongChen - 25 Sep 2014

Bryan: If I consider the upgrade to Visual Studio Professional 2013, do you think that is a good option? Thanks, Jizhong

-- JizhongChen - 25 Sep 2014

Using 2013 will be a different story. Let me close this VS2010 question first. Thanks for your support.

-- JizhongChen - 26 Sep 2014

-- JizhongChen - 26 Sep 2014 No such template def TMPL:DEF{PROMPT:supportquery}

Topic revision: r11 - 26 Sep 2014, JizhongChen

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