cmake build command produces empty output - windows

initial conditions:
simple source file:
#include <stdio.h>
int main ()
{
printf("Hello, World!\n")
return 0;
}
please pay the attention on missing ";" , that's for the testing.
also simple cmakelists.txt:
cmake_minimum_required(VERSION 3.16)
project(test3 C)
set(CMAKE_C_STANDARD 11)
add_executable(test3 main.c)
the environment has been initialized so:
C:\dev\workspace\test3\cmake-build-debug>"C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Professional\VC\Auxiliary\Build\"vcvarsall.bat x64
** Visual Studio 2019 Developer Command Prompt v16.5.1
** Copyright (c) 2019 Microsoft Corporation
********************************************************************** ["vcvarsall.bat] Environment initialized for: 'x64'
C:\dev\workspace\test3\cmake-build-debug>C:\dev\tools\apps\CLion\ch-0\201.6487.17\bin\cmake\win\bin\cmake.exe
.. -G "NMake Makefiles"
-- The C compiler identification is MSVC 19.25.28611.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/workspace/test3/cmake-build-debug
if I build the project using nmake the output looks correct (with compiler errors):
C:\dev\workspace\test3\cmake-build-debug>nmake
Microsoft (R) Program Maintenance Utility Version 14.25.28611.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target test3 [ 50%] Building C object
CMakeFiles/test3.dir/main.c.obj main.c
C:\dev\workspace\test3\main.c(6): error C2143: syntax error: missing
';' before 'return' C:\dev\workspace\test3\main.c(7): error C2143:
syntax error: missing ';' before '}' NMAKE : fatal error U1077:
'C:\PROGRA~2\MIB055~1\2019\PROFES~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\cl.exe'
: return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\nmake.exe"'
: return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\nmake.exe"'
: return code '0x2' Stop.
however if I try to use cmake to build, it produces empty output:
C:\dev\workspace\test3\cmake-build-debug>cd ..
C:\dev\workspace\test3>C:\dev\tools\apps\CLion\ch-0\201.6487.17\bin\cmake\win\bin\cmake.exe
--build C:\dev\workspace\test3\cmake-build-debug --target test3
C:\dev\workspace\test3>
what can be wrong here?

Related

Raspberry Pi Pico SDK build Error (LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe')

I am installing Raspberry Pi Pico SDK using the pre-built installer.
I am getting the error LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe'
The same installer is working properly on the different development machine.
Error
Building blink
Microsoft (R) Program Maintenance Utility Version 14.32.31332.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target bs2_default
[ 0%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 0%] Linking ASM executable bs2_default.elf
[ 0%] Built target bs2_default
[ 0%] Generating bs2_default.bin
[ 0%] Generating bs2_default_padded_checksummed.S
[ 0%] Built target bs2_default_padded_checksummed_asm
[ 0%] Creating directories for 'ELF2UF2Build'
[ 0%] No download step for 'ELF2UF2Build'
[ 0%] No update step for 'ELF2UF2Build'
[ 0%] No patch step for 'ELF2UF2Build'
[ 0%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeTmp
Run Build Command(s):nmake -f Makefile /nologo cmTC_9542e\fast && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe" -f CMakeFiles\cmTC_9542e.dir\build.make /nologo -L CMakeFiles\cmTC_9542e.dir\build
Building C object CMakeFiles/cmTC_9542e.dir/testCCompiler.c.obj
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_9542e.dir\testCCompiler.c.obj.d --working-dir=C:\Pico\pico-examples\build\elf2uf2\CMakeFiles\CMakeTmp --filter-prefix="Note: including file: " -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\cl.exe #C:\Users\Test\AppData\Local\Temp\nm15C.tmp
testCCompiler.c
Linking C executable cmTC_9542e.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_9542e.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x86\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\link.exe /nologo #CMakeFiles\cmTC_9542e.dir\objects1.rsp #C:\Users\Test\AppData\Local\Temp\nm1AC.tmp
FINAL LINK: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\link.exe /nologo #CMakeFiles\cmTC_9542e.dir\objects1.rsp /out:cmTC_9542e.exe /implib:cmTC_9542e.lib /pdb:C:\Pico\pico-examples\build\elf2uf2\CMakeFiles\CMakeTmp\cmTC_9542e.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_9542e.dir/intermediate.manifest CMakeFiles\cmTC_9542e.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe'
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeOutput.log".
See also "C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeError.log".
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
C:\Pico>

Turtlebot3 Ros1 Windows setup issue

This is the console output for command catkin_make
I am currently trying to setup a virtual environment for the turtlebot3 based on the windows variation: https://emanual.robotis.com/docs/en/platform/turtlebot3/pc_setup/
Setting up Ros1 under windows worked without problems, but the command
catkin_make
on the turtlebot site gave me an error.
CMakeError:
Determining if the include file pthread.h exists failed with the
following output: Change Dir:
C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_af455\fast && "C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"
-f CMakeFiles\cmTC_af455.dir\build.make /nologo -L CMakeFiles\cmTC_af455.dir\build
Building C object CMakeFiles/cmTC_af455.dir/CheckIncludeFile.c.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe
#C:\Users\Braun\AppData\Local\Temp\nm756D.tmp
CheckIncludeFile.c
C:\ws\turtlebot3\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1):
fatal error C1083: Cannot open include file: 'pthread.h': No such file
or directory
NMAKE : fatal error U1077:
'C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe'
: return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"'
: return code '0x2'
Stop.
CMakeOutput:
The system is: Windows - 10.0.18363 - AMD64 Compiling the C compiler
identification source file "CMakeCCompilerId.c" succeeded. Compiler:
C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
Build flags: Id flags:
The output was: 0 Microsoft (R) C/C++ Optimizing Compiler Version
19.26.28806 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCCompilerId.c Microsoft (R) Incremental Linker Version
14.26.28806.0 Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCCompilerId.exe CMakeCCompilerId.obj
Compilation of the C compiler identification source
"CMakeCCompilerId.c" produced "CMakeCCompilerId.exe"
Compilation of the C compiler identification source
"CMakeCCompilerId.c" produced "CMakeCCompilerId.obj"
The C compiler identification is MSVC, found in
"C:/ws/turtlebot3/build/CMakeFiles/3.17.3/CompilerIdC/CMakeCCompilerId.exe"
Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" succeeded. Compiler: C:/Program Files
(x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
Build flags: Id flags:
The output was: 0 Microsoft (R) C/C++ Optimizing Compiler Version
19.26.28806 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCXXCompilerId.cpp Microsoft (R) Incremental Linker Version
14.26.28806.0 Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCXXCompilerId.exe CMakeCXXCompilerId.obj
Compilation of the CXX compiler identification source
"CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe"
Compilation of the CXX compiler identification source
"CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj"
The CXX compiler identification is MSVC, found in
"C:/ws/turtlebot3/build/CMakeFiles/3.17.3/CompilerIdCXX/CMakeCXXCompilerId.exe"
Determining if the C compiler works passed with the following output:
Change Dir: C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_6bdf7\fast && "C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"
-f CMakeFiles\cmTC_6bdf7.dir\build.make /nologo -L CMakeFiles\cmTC_6bdf7.dir\build
Building C object CMakeFiles/cmTC_6bdf7.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe
#C:\Users\Braun\AppData\Local\Temp\nm6A32.tmp
testCCompiler.c
Linking C executable cmTC_6bdf7.exe
C:\opt\python27amd64\Lib\site-packages\cmake\data\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_6bdf7.dir
--rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\link.exe
/nologo #CMakeFiles\cmTC_6bdf7.dir\objects1.rsp
#C:\Users\Braun\AppData\Local\Temp\nm6B6C.tmp
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_5fcdd\fast && "C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"
-f CMakeFiles\cmTC_5fcdd.dir\build.make /nologo -L CMakeFiles\cmTC_5fcdd.dir\build
Building C object CMakeFiles/cmTC_5fcdd.dir/CMakeCCompilerABI.c.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe
#C:\Users\Braun\AppData\Local\Temp\nm6C84.tmp
CMakeCCompilerABI.c
Linking C executable cmTC_5fcdd.exe
C:\opt\python27amd64\Lib\site-packages\cmake\data\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_5fcdd.dir
--rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\link.exe
/nologo #CMakeFiles\cmTC_5fcdd.dir\objects1.rsp
#C:\Users\Braun\AppData\Local\Temp\nm6CC4.tmp
Determining if the CXX compiler works passed with the following
output: Change Dir: C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_f8e3d\fast && "C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"
-f CMakeFiles\cmTC_f8e3d.dir\build.make /nologo -L CMakeFiles\cmTC_f8e3d.dir\build
Building CXX object CMakeFiles/cmTC_f8e3d.dir/testCXXCompiler.cxx.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe
#C:\Users\Braun\AppData\Local\Temp\nm6DEC.tmp
testCXXCompiler.cxx
Linking CXX executable cmTC_f8e3d.exe
C:\opt\python27amd64\Lib\site-packages\cmake\data\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_f8e3d.dir
--rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\link.exe
/nologo #CMakeFiles\cmTC_f8e3d.dir\objects1.rsp
#C:\Users\Braun\AppData\Local\Temp\nm6E2B.tmp
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_39a62\fast && "C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"
-f CMakeFiles\cmTC_39a62.dir\build.make /nologo -L CMakeFiles\cmTC_39a62.dir\build
Building CXX object
CMakeFiles/cmTC_39a62.dir/CMakeCXXCompilerABI.cpp.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\cl.exe
#C:\Users\Braun\AppData\Local\Temp\nm6F24.tmp
CMakeCXXCompilerABI.cpp
Linking CXX executable cmTC_39a62.exe
C:\opt\python27amd64\Lib\site-packages\cmake\data\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_39a62.dir
--rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\link.exe
/nologo #CMakeFiles\cmTC_39a62.dir\objects1.rsp
#C:\Users\Braun\AppData\Local\Temp\nm6F64.tmp
There is also error text in the console during the command:
CMake Error at
opt/rosdeps/x64/share/protobuf/protobuf-targets.cmake:37 (message):
Some (but not all) targets in this export set were already defined.
targets defined: protobuf::libprotobuf;protobuf::libprotoc
targets not yet defined: protobuf::protoc

error with the limits library visual c++

I've trying to compile libSVM on W10 with Visual Studio 2015 Enterprise compiler and I get this error.
I type nmake -f makefile.win
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl.exe -nologo -O2 -EHsc -I. -D __WIN32__ -D _CRT_SECURE_NO_DEPRECATE -c timer.cpp
timer.cpp
timer.cpp(26): fatal error C1083: Cannot open include file: 'limits': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe"' : return code '0x2'
Stop.
It seems some problem with visual studio installation?
I've think that was something related to the C++ Compiler.

How to run Visual Studio 2015 and 2017 on the same machine?

I installed Visual Studio Community 2015 on a server running Windows Server 2012 R2. I confirmed that the toolchain was able to build my C++ project (which uses CMake).
I then installed Visual Studio Community 2017 and confirmed that the toolchain was working as well. However, to my dismay, I soon discovered that the 2015 toolchain was no longer working. Trying to build my project resulted in the following errors:
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Nathan/Documents/repositories/qmdnsengine/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_614a9\fast"
"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\cmTC_614a9.dir\build.make
/nologo -L CMakeFiles\cmTC_614a9.dir\build
Building C object CMakeFiles/cmTC_614a9.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe
#C:\Users\Nathan\AppData\Local\Temp\2\nmB42E.tmp
testCCompiler.c
Linking C executable cmTC_614a9.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_614a9.dir --manifests --
C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo
#CMakeFiles\cmTC_614a9.dir\objects1.rsp
#C:\Users\Nathan\AppData\Local\Temp\2\nmB577.tmp
RC Pass 1 failed to run.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Nathan/Documents/repositories/qmdnsengine/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Nathan/Documents/repositories/qmdnsengine/build
What does this error mean and how would I go about fixing it?

nmake of (OSRM v4.5.0) fails due to constexpr (C++11) with msvc12

I have an issue with OSRM back-end v4.5.0 build with nmake (see hereafter the error output). The "constexpr" in "Coordinate.h" is not supported by msvc12.
The question is, how to force cmake/nmake to use the CTP compiler !?
Thanks for your reply
Coordinate.h
...
namespace {
constexpr float COORDINATE_PRECISION = 1000000.f;
}
...
Error output
D:\osrm450be\build>nmake
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target COORDINATE [ 2%] Building CXX object
CMakeFiles/COORDINATE.dir/data_structures/Coordinate.cpp.obj
Coordinate.cpp D:\osrm450be\Include\osrm/Coordinate.h(37) : error
C2144: syntax error : 'float' should be preceded by ';'
D:\osrm450be\Include\osrm/Coordinate.h(37) : error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
D:\osrm450be\data_structures\Coordinate.cpp(290) : warning C4244: '='
: conversion from 'double' to 'float', possible loss of data NMAKE :
fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' : return
code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files
(x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.
Well I think using cmake with the following parameters:
cmake .. -G "Visual Studio 12 Win64" -T CTP_Nov2013 -DCMAKE_BUILD_TYPE=Release ...
one also need to define "__STDC_LIMIT_MACROS"

Resources