Compilation in VS2015
#1
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.
Reply
Thanks given by:
#2
Is this stackoverflow question related?
http://stackoverflow.com/questions/31750...ource-file
Reply
Thanks given by:
#3
No, it's not. His problem is with precompiled headers, ours is not.
Reply
Thanks given by:
#4
Perhaps something here might explain some things (though I couldn't a reason why it shouldn't work).
Reply
Thanks given by:
#5
Appveyor is trying to force MSVC2015 on our builds quite periodically. We should do something about this thing.
Reply
Thanks given by:
#6
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
Reply
Thanks given by: NiLSPACE
#7
Wow, that was fastTongue
Reply
Thanks given by:
#8
Yeah, I wonder how he did find out what's wrong, I'd have no idea.
Reply
Thanks given by:
#9
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/c...80cac25e1c
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)