Hello,
I am facing problems building Couchbase-lite-C with CMake on Windows. I have also noticed that the LiteCore submodule used in the latest commit of Couchbase-lite-C does not compile on Windows if I try to compile it by itself. The latest commit of LiteCore (master), however, compiles with no problems on Windows.
This is the error message I am currently receiving:
17:07:59: Running steps for project CouchbaseLite_C…
17:08:00: Persisting CMake state…
17:08:17: Starting: “C:\Program Files\CMake\bin\cmake.exe” --build . --target all
Scanning dependencies of target CouchbaseLiteCStatic
[ 0%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLBase.cc.obj
CBLBase.cc
[ 0%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLBlob.cc.obj
CBLBlob.cc
[ 0%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLDatabase.cc.obj
CBLDatabase.cc
[ 0%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLDocument.cc.obj
CBLDocument.cc
[ 0%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLLog.cc.obj
CBLLog.cc
[ 1%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLQuery.cc.obj
CBLQuery.cc
[ 1%] Building CXX object CMakeFiles/CouchbaseLiteCStatic.dir/src/CBLReplicator.cc.obj
CBLReplicator.cc
c:\users\beave\desktop\couchbase-lite-c\src\CBLReplicator_Internal.hh(51): error C3861: ‘max’: identifier not found
c:\users\beave\desktop\couchbase-lite-c\src\CBLReplicator_Internal.hh(55): error C2397: conversion from ‘const uint64_t’ to ‘float’ requires a narrowing conversion
c:\users\beave\desktop\couchbase-lite-c\src\CBLReplicator_Internal.hh(52): warning C4244: ‘initializing’: conversion from ‘const uint64_t’ to ‘float’, possible loss of data
NMAKE : fatal error U1077: ‘C:\PROGRA~2\MICROS~1\2017\BUILDT~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe’ : return code ‘0x2’
Stop.
Any help will be appreciated. I had a similar issue about a week ago, which was quickly solved by @jens. Thanks in advance.