Hi.

I recently tried to build the Jinja2Cpp library on Windows 10 with Visual 
Studio 2017.  I had managed to do this successfully before, but when I tried it 
again this time after deleting the `Jinja2Cpp` directory and cloning from the 
GitHub repo again, I had errors in CMake and couldn't generate files correctly.

I've attached three files to this email.  One is a text file I made myself by 
copy-pasting the output I got from my CMake build attempt.  The other two are 
the log files mentioned in said output.

Note: The command I had used was "cmake .. -DCMAKE_INSTALL_PREFIX=../install".

I opened an issue for this at the Jinja2Cpp GitHub repo as well; here: 
https://github.com/flexferrum/Jinja2Cpp/issues/75 .  I want to try to edit the 
CMakeLists.txt file to use Clang instead if I can't get it to work with Visual 
Studio, but for now I want to try getting it to work with Visual Studio.
[https://avatars0.githubusercontent.com/u/18173932?s=400&v=4]<https://github.com/flexferrum/Jinja2Cpp/issues/75>

Can't Build Jinja2Cpp on Windows with Visual Studio 2017 Anymore · Issue #75 · 
flexferrum/Jinja2Cpp<https://github.com/flexferrum/Jinja2Cpp/issues/75>
Just now, just to check, I tried to build the library on Windows again by 
cloning fresh into Jinja2Cpp, updating the submodule, and then running cmake 
-DCMAKE_INSTALL_PREFIX=../install and got this...
github.com


C:\Jinja2Cpp\build>cmake .. -DCMAKE_INSTALL_PREFIX=../install
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.15.26730.0
-- The CXX compiler identification is MSVC 19.15.26730.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe -- broken
CMake Error at C:/Program Files 
(x86)/CMake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual 
Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Jinja2Cpp/build/CMakeFiles/CMakeTmp

    Run Build Command:"C:/Program Files (x86)/Microsoft Visual 
Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_f8e1b.vcxproj" 
"/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
    Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 10/18/2018 1:51:09 AM.
    Project "C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj" on node 
1 (default targets).
    PrepareForBuild:
      Creating directory "cmTC_f8e1b.dir\Debug\".
      Creating directory "C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\Debug\".
      Creating directory "cmTC_f8e1b.dir\Debug\cmTC_f8e1b.tlog\".
    InitializeBuildStatus:
      Creating "cmTC_f8e1b.dir\Debug\cmTC_f8e1b.tlog\unsuccessfulbuild" because 
"AlwaysCreate" was specified.
    VcpkgTripletSelection:
      Using triplet "x86-windows" from "C:\vcpkg\installed\x86-windows\"
    ClCompile:
      C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\CL.exe /c 
/I"C:\Program Files (x86)\Visual Leak Detector\include" 
/I"C:\vcpkg\installed\x86-windows\include" /Zi /W3 /WX- /diagnostics:classic 
/Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- 
/RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline 
/Fo"cmTC_f8e1b.dir\Debug\\" /Fd"cmTC_f8e1b.dir\Debug\vc141.pdb" /Gd /TC 
/analyze- /FC /errorReport:queue 
C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\testCCompiler.c
      Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26730 for x86
      Copyright (C) Microsoft Corporation.  All rights reserved.

      cl /c /I"C:\Program Files (x86)\Visual Leak Detector\include" 
/I"C:\vcpkg\installed\x86-windows\include" /Zi /W3 /WX- /diagnostics:classic 
/Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- 
/RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline 
/Fo"cmTC_f8e1b.dir\Debug\\" /Fd"cmTC_f8e1b.dir\Debug\vc141.pdb" /Gd /TC 
/analyze- /FC /errorReport:queue 
C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\testCCompiler.c
      testCCompiler.c

    Link:
      C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\link.exe 
/ERRORREPORT:QUEUE 
/OUT:"C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\Debug\cmTC_f8e1b.exe" /INCREMENTAL 
/NOLOGO /LIBPATH:"C:\Program Files (x86)\Visual Leak Detector\lib\Win32" 
/LIBPATH:"C:\vcpkg\installed\x86-windows\debug\lib" 
/LIBPATH:"C:\vcpkg\installed\x86-windows\debug\lib\manual-link" kernel32.lib 
user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
comdlg32.lib advapi32.lib "C:\vcpkg\installed\x86-windows\debug\lib\*.lib" 
/MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed 
/DEBUG /PDB:"C:/Jinja2Cpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_f8e1b.pdb" 
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT 
/IMPLIB:"C:/Jinja2Cpp/build/CMakeFiles/CMakeTmp/Debug/cmTC_f8e1b.lib" 
/MACHINE:X86 /SAFESEH  /machine:X86 LDFLAGS=-static-libstdc++ -static-libgcc 
cmTC_f8e1b.dir\Debug\testCCompiler.obj
    LINK : warning LNK4044: unrecognized option '/static-libgcc'; ignored 
[C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj]
    LINK : fatal error LNK1104: cannot open file 
'LDFLAGS=-static-libstdc++.obj' 
[C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj]
    Done Building Project 
"C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj" (default targets) 
-- FAILED.

    Build FAILED.

    "C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj" (default 
target) (1) ->
    (Link target) ->
      LINK : warning LNK4044: unrecognized option '/static-libgcc'; ignored 
[C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj]


    "C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj" (default 
target) (1) ->
    (Link target) ->
      LINK : fatal error LNK1104: cannot open file 
'LDFLAGS=-static-libstdc++.obj' 
[C:\Jinja2Cpp\build\CMakeFiles\CMakeTmp\cmTC_f8e1b.vcxproj]

        1 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:01.68




  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:/Jinja2Cpp/build/CMakeFiles/CMakeOutput.log".
See also "C:/Jinja2Cpp/build/CMakeFiles/CMakeError.log".

Attachment: CMakeError.log
Description: CMakeError.log

Attachment: CMakeOutput.log
Description: CMakeOutput.log

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to