When I declare a Mat from opencv, the program still compiles without issues, but then does not produce any output when run. There are no warnings or errors during compilation. However, this builds and runs correctly on Linux.
Is this an issue with the compiler, or am I overlooking something extremely obvious?
Note: In the build you can see that I am using the CLion IDE. I only use it for code insights and do all compilation and cmake tasks with the command line.
Includes
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
using namespace cv;
Working run
int main( int argc, char** argv ){
std::cout << "TEST\n";
// This line is commented out!
// Mat object;
if (argc < 2) {
std::cout << "There was an issue!\n";
return 0;
}
/* Commented out code */
return 0;
}
C:\Path\To\Project\build> cmake --build . --config Release
Wow! Your code is amazing and compiled without any issues!
C:\Path\To\Project\build> Release\test.exe
TEST
There was an issue!
Problem run
int main( int argc, char** argv ){
std::cout << "TEST\n";
// All I did was remove the comment on this line!
Mat object;
if (argc < 2) {
std::cout << "There was an issue!\n";
return 0;
}
/* Commented out code */
return 0;
}
C:\Path\To\Project\build> cmake --build . --config Release
Wow! Your code is amazing and compiled without any issues!
C:\Path\To\Project\build> Release\test.exe
C:\Path\To\Project\build> exited without output
Build
C:\Users\home\CLionProjects\untitled\build>cmake --build . --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 1/14/2019 9:54:14 PM.
Project "C:\Users\home\CLionProjects\untitled\build\ALL_BUILD.vcxproj" on node 1 (default targets).
Project "C:\Users\home\CLionProjects\untitled\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\home\CLionProjects\untitled\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
InitializeBuildStatus:
Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
FinalizeBuildStatus:
Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\Users\home\CLionProjects\untitled\build\ZERO_CHECK.vcxproj" (default targets).
Project "C:\Users\home\CLionProjects\untitled\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\home\CLionProjects\untitled\build\Test.vcxproj" (3) on node 1 (default targets).
InitializeBuildStatus:
Creating "Test.dir\Release\Test.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /I"C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\include" /nologo /W3 /WX- /diagnostics:classic /O2 /Ob2 /D WIN32 /D _WINDOWS /
D NDEBUG /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"Test.dir\Release\\" /Fd"Test.dir\Release\vc141.pdb" /Gd /TP /errorReport:queue C:\Users\home\CLionProjects\untitled\main.cpp
main.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\home\CLionProjects\untitled\build\Release\Test.exe" /INCREMENTAL:NO /NOLOGO "C:\Users\home\Documents\opencv-4.
0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_dnn401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_gapi401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_ml401.lib" "
C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_objdetect401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_photo401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\buil
d\install\x64\vc15\lib\opencv_stitching401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_video401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_calib3d401.lib" "C:\Users\
home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_features2d401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_flann401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\instal
l\x64\vc15\lib\opencv_highgui401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_videoio401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_imgcodecs401.lib" "C:\Users\home
\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_imgproc401.lib" "C:\Users\home\Documents\opencv-4.0.1\opencv-4.0.1\build\install\x64\vc15\lib\opencv_core401.lib" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut
32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"C:/Users/home/CLionProjects/untitled/build/Release/Test.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/home
/CLionProjects/untitled/build/Release/Test.lib" /MACHINE:X64 /machine:x64 Test.dir\Release\main.obj
Test.vcxproj -> C:\Users\home\CLionProjects\untitled\build\Release\Test.exe
FinalizeBuildStatus:
Deleting file "Test.dir\Release\Test.tlog\unsuccessfulbuild".
Touching "Test.dir\Release\Test.tlog\Test.lastbuildstate".
Done Building Project "C:\Users\home\CLionProjects\untitled\build\Test.vcxproj" (default targets).
InitializeBuildStatus:
Creating "x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
FinalizeBuildStatus:
Deleting file "x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
Touching "x64\Release\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
Done Building Project "C:\Users\home\CLionProjects\untitled\build\ALL_BUILD.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.64
Is there an issue with the library I am using when building on Windows? Is my compiler silently failing? Did I make a simple mistake?
Related
This question already has answers here:
CMake cannot open "ucrtd.lib"
(3 answers)
Closed 11 months ago.
I downloaded vscode with (C/C++ and cmake extentions) and Visual Studio Tools 2022. Created and QuickStart project with the cmake extention which is a simple:
#include <iostream>
int main(int, char**) {
std::cout << "Hello, world!\n";
}
cmake_minimum_required(VERSION 3.0.0)
project(hello-cmake VERSION 0.1.0)
include(CTest)
enable_testing()
add_executable(hello-cmake main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
but I keep getting this error:
[variant] Loaded new set of variants
[kit] Successfully loaded 4 kits from C:\Users\Will\AppData\Local\CMakeTools\cmake-tools-kits.json
[visual-studio] Patch Windows SDK bin path from C:\Program Files (x86)\Windows Kits\10\bin\x86 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 for C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -Sc:/Users/Will/source/hello-cmake -Bc:/Users/Will/source/hello-cmake/build -G "Visual Studio 17 2022"
[main] Configuring folder: hello-cmake
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Sc:/Users/Will/source/hello-cmake -Bc:/Users/Will/source/hello-cmake/build -G "Visual Studio 17 2022"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] No CMAKE_C_COMPILER could be found.
[cmake]
[cmake]
[cmake]
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] No CMAKE_CXX_COMPILER could be found.
[cmake]
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/Users/Will/source/hello-cmake/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/Users/Will/source/hello-cmake/build/CMakeFiles/CMakeError.log".
[visual-studio] Patch Windows SDK bin path from C:\Program Files (x86)\Windows Kits\10\bin\x86 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 for C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
this is the CMakeError
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:21 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.60
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:21 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.43
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:22 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.44
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:23 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.44
This is actually the answer.
https://stackoverflow.com/a/71418520/6656422
10.0.19041.0is a bad windows sdk version. I installed 10.0.20348.0 and it works no problem.
I am trying to compile GLFM using emscripten and cmake. I followed the instructions on the GitHub page to do so, and the cmake command to generate all of the project files works without a hitch (other than some deprecation warnings), but when I enter the line cmake --build . I get errors.
Here is the entire output:
E:\emproj\glfm\build\emscripten>cmake --build .
Microsoft (R) Build Engine version 15.6.85.37198 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/27/2018 3:21:04 PM.
Project "E:\emproj\glfm\build\emscripten\ALL_BUILD.vcxproj" on node 1 (default targets).
Project "E:\emproj\glfm\build\emscripten\ALL_BUILD.vcxproj" (1) is building "E:\emproj\glfm\build\emscripten\ZERO_CHECK
.vcxproj" (2) on node 1 (default targets).
InitializeBuildStatus:
Creating "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
All outputs are up-to-date.
FinalizeBuildStatus:
Deleting file "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "E:\emproj\glfm\build\emscripten\ZERO_CHECK.vcxproj" (default targets).
Project "E:\emproj\glfm\build\emscripten\ALL_BUILD.vcxproj" (1) is building "E:\emproj\glfm\build\emscripten\glfm.vcxpr
oj" (3) on node 1 (default targets).
InitializeBuildStatus:
Touching "glfm.dir\Debug\glfm.tlog\unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\CL.exe /c /IE
:\emproj\glfm\include /IE:\emproj\glfm\src /nologo /W1 /WX- /diagnostics:classic /O2 /Oy- /D "CMAKE_INTDIR=\"Debug\""
/D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"glfm.dir\Debug\\" /Fd"glfm.dir\Debug\glfm.
pdb" /Gd /TC /analyze- /FC /errorReport:queue -g -Weverything -Wwrite-strings -Wno-padded -Wno-covered-switch-defaul
t E:\emproj\glfm\src\glfm_platform_emscripten.c
cl : Command line error D8021: invalid numeric argument '/Weverything' [E:\emproj\glfm\build\emscripten\glfm.vcxproj]
Done Building Project "E:\emproj\glfm\build\emscripten\glfm.vcxproj" (default targets) -- FAILED.
Done Building Project "E:\emproj\glfm\build\emscripten\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\emproj\glfm\build\emscripten\ALL_BUILD.vcxproj" (default target) (1) ->
"E:\emproj\glfm\build\emscripten\glfm.vcxproj" (default target) (3) ->
(ClCompile target) ->
cl : Command line error D8021: invalid numeric argument '/Weverything' [E:\emproj\glfm\build\emscripten\glfm.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.68
Its complaint is with the argument /Weverything. I looked in the project's CMakeLists.txt file and it looks like this command is only supposed to be used if the active compiler is clang. Could this be the issue? It is using visual studio as a host, should it be doing that?
It says that emscripten 1.35.0 is required and that's the exact version I'm using.
I also followed the instructions to get it running in Android Studio and it worked without a hitch.
Thanks in advance for help!
The solution to this problem is as follows:
Don't use windows.
I used Ubuntu and everything went excellently aside from installing a modern version cmake. After searching for a while the method for doing that which worked for me can be found here: https://peshmerge.io/how-to-install-cmake-3-11-0-on-ubuntu-16-04/
I'm trying to change the compiler collection of a project which uses a lot of exceptions (try/catch blocks) from Microsoft Visual C++ to LLVM, but ran into compilation issues.
Used tool chain:
Visual Studio 2015 Enterprise (MSVC 14)
LLVM 3.7 Windows/x64
Here is some test source code:
#include <iostream>
int main()
{
try
{
throw 20;
}
catch (int e)
{
std::cout << "An exception occurred. Exception Nr. " << e << '\n';
}
return 0;
}
Compiling the code with the built-in Visual Studio compiler collection (v140), this are the command line results:
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe
/c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Zc:inline /Fo "Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP
/analyze- /errorReport:queue Main.cpp
Main.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe
/ERRORREPORT:QUEUE /OUT:"C:\Users\jurocha\Desktop\ClangExcept\Debug\ClangExcept.exe"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
/MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /Debug
/PDB:"C:\Users\jurocha\Desktop\ClangExcept\Debug\ClangExcept.pdb" /TLBID:1
/DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:\Users\jurocha\Desktop\ClangExcept\Debug\ClangExcept.lib"
/MACHINE:X86 Debug\Main.obj
Compilation succeeds.
Now, changing the compilers to LLVM (LLVM-vs2014):
ClCompile:
C:\Program Files\LLVM\3.7\msbuild-bin\CL.exe
/c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP
/analyze- /errorReport:queue -m32 -fmsc-version=1900 Main.cpp
clang-cl.exe : warning : argument unused during compilation: '/ZI' [ClangExcept.vcxproj]
clang-cl.exe : warning : argument unused during compilation: '/Gm' [ClangExcept.vcxproj]
clang-cl.exe : warning : argument unused during compilation: '/GS' [ClangExcept.vcxproj]
Main.cpp(7,3): error : cannot use 'throw' with exceptions disabled [ClangExcept.vcxproj]
throw 20;
^
Main.cpp(5,2): error : cannot use 'try' with exceptions disabled [ClangExcept.vcxproj]
try
^
2 errors generated.
According to this document, http://clang.llvm.org/docs/MSVCCompatibility.html:
"Exceptions and SEH: Partial". But I can't make enough sense of it.
Has anyone been able to achieve this?
The LLVM page you link to says
Exceptions and SEH: Partial. C++ exceptions (try / catch / throw) and structured exceptions (__try / __except / __finally) mostly work on x64. 32-bit exception handling support is being worked on.
But in your link parameters for VC++ you have /MACHINE:X86, and you also pass -m32 to LLVM, which indicates that you try to build a 32-bit application - the model that doesn't work.
Change your settings to build a 64-bit executable instead.
Your example with exceptions now compile and even run in 32 bits with visual 2015 Community Update 1 using LLVM-3.9.0svn-r258602-win64.exe which can be found here
http://sourceforge.net/projects/clangonwin/
I am a fresh on CGAL, I met a problem, my CMake2.8.12 (VS2010 c++ express version) seems can not work for the CGAL 4.3. I put the Error.log here
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec3635631916.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:30:40 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec3635631916.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3635631916.dir\Debug\\" /Fd"cmTryCompileExec3635631916.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3635631916.dir\Debug\\" /Fd"cmTryCompileExec3635631916.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.embed.manifest.res" cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3635631916.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3635631916.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3635631916.lib" /MACHINE:X86 cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.embed.manifest.res
cmTryCompileExec3635631916.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec3236418378.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:32:41 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec3236418378.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3236418378.dir\Debug\\" /Fd"cmTryCompileExec3236418378.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3236418378.dir\Debug\\" /Fd"cmTryCompileExec3236418378.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.embed.manifest.res" cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3236418378.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3236418378.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3236418378.lib" /MACHINE:X86 cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.embed.manifest.res
cmTryCompileExec3236418378.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec787580669.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:35:54 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec787580669.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec787580669.dir\Debug\\" /Fd"cmTryCompileExec787580669.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec787580669.dir\Debug\\" /Fd"cmTryCompileExec787580669.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.embed.manifest.res" cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec787580669.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec787580669.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec787580669.lib" /MACHINE:X86 cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.embed.manifest.res
cmTryCompileExec787580669.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
I dont know what to do, please help me. Thank you very much!!!
Your version number indicates you're not running SP1. Update Visual Studio 2010, then the problem should be solved, as it was for me.
I have encountered a problem while trying to compile simple example with boost using Visual Studio 2012 Pro. I have downloaded and compiled boost succesfully (ver 1.54.0). I have compiled 32 bit version (Win32 configuration) of example in both release and debug version. Then I made an attempt to build for 64 bit (as I have 64 bit Windows 7). I followed the instruction here: How to: Configure Visual C++ Projects to Target 64-Bit Platforms. Alas, the compilation attempt failed with error:
1>server.cpp(38): fatal error C1083: Cannot open include file: 'boost/aligned_storage.hpp': No such file or directory
I checked the following points and now I'm out of ideas what could be wrong:
The file is in correct place (exact location: C:\dev\include\boost\boost\aligned_storage.hpp). If it hadn't been there then the Win32 version wouldn't have compiled.
I have set the environment variable INCLUDE as "C:\dev/include;C:\dev/include/boost" .
"VC++ Directories->Include Directories" looks like this:
$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(INCLUDE);
"C/C++ -> General -> Additional Include Directories" like this:
C:\dev\include\boost;%(AdditionalIncludeDirectories)
The code I'm trying to compile is (this is only part of it of course):
//
// server.cpp
// ~~~~~~~~~~
//
// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef WINVER // Minimum platform is Windows 7
#define WINVER 0x0601
#endif
#ifndef _WIN32_WINNT // Minimum platform is Windows 7
#define _WIN32_WINNT 0x0601
#endif
#ifndef _WIN32_WINDOWS // Minimum platform is Windows 7
#define _WIN32_WINDOWS 0x0601
#endif
#include <cstdlib>
#include <iostream>
#include <boost/aligned_storage.hpp>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
using boost::asio::ip::tcp;
Content of my x64\Debug\BoostExample.log:
Build started 2013-07-15 19:45:53.
1>Project "C:\Users\LF\Develop\BoostExample\BoostExample\BoostExample.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vc110.pdb" /Gd /TP /errorReport:prompt server.cpp
server.cpp
1>server.cpp(38): fatal error C1083: Cannot open include file: 'boost/aligned_storage.hpp': No such file or directory
1>Done Building Project "C:\Users\LF\Develop\BoostExample\BoostExample\BoostExample.vcxproj" (Build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:00.28
For comparison here is Release\BoostExample.log (for succesfull 32bit compilation):
Build started 2013-07-15 20:06:17.
1>Project "C:\Users\LF\Develop\BoostExample\BoostExample\BoostExample.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D _MBCS /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt server.cpp
server.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\LF\Develop\BoostExample\Release\BoostExample.exe" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\LF\Develop\BoostExample\Release\BoostExample.pdb" /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\LF\Develop\BoostExample\Release\BoostExample.lib" /MACHINE:X86 /SAFESEH Release\server.obj
Generating code
Finished generating code
BoostExample.vcxproj -> C:\Users\LF\Develop\BoostExample\Release\BoostExample.exe
1>Done Building Project "C:\Users\LF\Develop\BoostExample\BoostExample\BoostExample.vcxproj" (Build target(s)).
Build succeeded.
Time Elapsed 00:00:02.50
Any help will be greatly appreciated :D.
Thanks in advanceLehu