Compilation in VS2015 - xoft - 08-06-2015
I installed Win10 and MSVC2015 Community Edition into a virtualboxed VM to try it out. Turns out that the project won't compile at all:
Code: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(424): warning C4346: 'std::is_nothrow_move_assignable<_Ty>::value': dependent name is not a type (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(424): note: prefix with 'typename' to indicate a type (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(463): note: see reference to class template instantiation 'std::tuple<_This,_Rest...>' being compiled (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(424): error C2061: syntax error: identifier 'value' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(426): error C2091: function returns function (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(454): error C2059: syntax error: 'throw' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(457): error C2091: function returns function (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(519): error C2988: unrecognizable template declaration/definition (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(519): error C2059: syntax error: ')' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C2988: unrecognizable template declaration/definition (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C2143: syntax error: missing ';' before '<' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C2059: syntax error: '<' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C2065: '_This': undeclared identifier (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C2065: '_Rest': undeclared identifier (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(532): error C3544: '_Types': parameter pack expects a type template argument (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(533): error C2143: syntax error: missing ';' before '{' (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple(533): error C2447: '{': missing function header (old-style formal list?) (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\map(172): warning C4346: 'std::map<_Kty,_Ty,_Pr,_Alloc>::std::map<_Kty,_Ty,_Pr,_Alloc>::_Alty::is_always_equal::value': dependent name is not a type (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\map(172): note: prefix with 'typename' to indicate a type (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\map(371): note: see reference to class template instantiation 'std::map<_Kty,_Ty,_Pr,_Alloc>' being compiled (compiling source file .\lib\SQLiteCpp\src\Transaction.cpp)
(Ran out of post space, the text got truncated. The full listing is at https://gist.github.com/madmaxoft/7abf907b493dd61b4afb )
This looks like a failure in MSVC itself, because all of the errors, except one version-related #error directive, are in the compiler's own STL headers.
For example the first batch of errors is caused by including <map> in file $/lib/SQLiteCpp/Statement.h while compiling the $/lib/SQLiteCpp/Transaction.cpp file. Weirdly enough the very same header file is used from other files (Statement.cpp) it works okay. No idea about what's wrong here.
RE: Compilation in VS2015 - LO1ZB - 08-06-2015
Is this stackoverflow question related?
http://stackoverflow.com/questions/31750073/vs2015-compile-time-error-when-i-write-an-header-and-a-source-file
RE: Compilation in VS2015 - xoft - 08-06-2015
No, it's not. His problem is with precompiled headers, ours is not.
RE: Compilation in VS2015 - NiLSPACE - 08-07-2015
Perhaps something here might explain some things (though I couldn't a reason why it shouldn't work).
RE: Compilation in VS2015 - xoft - 08-10-2015
Appveyor is trying to force MSVC2015 on our builds quite periodically. We should do something about this thing.
RE: Compilation in VS2015 - xoft - 08-10-2015
And it's fixed. All it needed was an update of SQLiteCpp, and a manual API check for LeakFinder.
https://github.com/cuberite/cuberite/pull/2424
RE: Compilation in VS2015 - NiLSPACE - 08-10-2015
Wow, that was fast
RE: Compilation in VS2015 - xoft - 08-10-2015
Yeah, I wonder how he did find out what's wrong, I'd have no idea.
RE: Compilation in VS2015 - worktycho - 08-11-2015
It looks like he fixed it coincidentally, because CppDepend said that throw() is depreciated, so he changed it in June as to how it handles unknown platforms, and added MSVC support at the same time. The commit is here https://github.com/SRombauts/SQLiteCpp/commit/d36c39ccf36a29f995a57669f31e7980cac25e1c
|