在Windows机器上构建libssh时,我遇到了很多困难。我克服了一些,但找不到任何解决方案。 这是它:
在谷歌搜索时无法找到明确的答案。
试图安装不同版本的openssl。 已安装Zlib。
这是CmakeOutputLog
The system is: Windows - 10.0.15063 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:
Build flags:
Id flags:
The output was:
0
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/12/2017 5:44:27 PM.
Project "D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\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:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\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:X86 /SAFESEH Debug\CMakeCCompilerId.obj
CompilerIdC.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\CompilerIdC\.\CompilerIdC.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_C_COMPILER=E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\cl.exe
FinalizeBuildStatus:
Deleting file "Debug\CompilerIdC.tlog\unsuccessfulbuild".
Touching "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\CompilerIdC\CompilerIdC.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.03
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"
The C compiler identification is MSVC, found in "D:/Programs/libssh/lsdlf/CMakeFiles/3.10.0-rc1/CompilerIdC/CompilerIdC.exe"
Determining if the C compiler works passed with the following output:
Change Dir: D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp
Run Build Command:"E:\Programs\Visual Studio Entreprise 2017/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_ebaad.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/12/2017 5:44:29 PM.
Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ebaad.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_ebaad.dir\Debug\".
Creating directory "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\".
InitializeBuildStatus:
Creating "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /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_ebaad.dir\Debug\\" /Fd"cmTC_ebaad.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\testCCompiler.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /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_ebaad.dir\Debug\\" /Fd"cmTC_ebaad.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\testCCompiler.c
testCCompiler.c
Link:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ebaad.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ebaad.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ebaad.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_ebaad.dir\Debug\testCCompiler.obj
cmTC_ebaad.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ebaad.exe
FinalizeBuildStatus:
Deleting file "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\unsuccessfulbuild".
Touching "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\cmTC_ebaad.lastbuildstate".
Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ebaad.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.50
Detecting C compiler ABI info compiled with the following output:
Change Dir: D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp
Run Build Command:"E:\Programs\Visual Studio Entreprise 2017/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_ac149.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/12/2017 5:44:30 PM.
Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ac149.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_ac149.dir\Debug\".
Creating directory "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\".
InitializeBuildStatus:
Creating "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /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_ac149.dir\Debug\\" /Fd"cmTC_ac149.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "D:\Programs\cmake\share\cmake-3.10\Modules\CMakeCCompilerABI.c"
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /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_ac149.dir\Debug\\" /Fd"cmTC_ac149.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "D:\Programs\cmake\share\cmake-3.10\Modules\CMakeCCompilerABI.c"
CMakeCCompilerABI.c
Link:
E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ac149.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ac149.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ac149.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_ac149.dir\Debug\CMakeCCompilerABI.obj
cmTC_ac149.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ac149.exe
FinalizeBuildStatus:
Deleting file "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\unsuccessfulbuild".
Touching "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\cmTC_ac149.lastbuildstate".
Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ac149.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.01