Please review: VS 2015 migration - Generic Rdbms provider

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Please review: VS 2015 migration - Generic Rdbms provider

Karsten Winter

Hi all


I’m currently migrating the projects to Visual Studio 2015.

Some errors occur with the new compiler for which I would like to get a review for the solution. The third part is about FDO generic Rdbms provider.





The concatenation of adjacent wide or raw string literals (L"Hello"L"World") will require a space to be inserted (L"Hello" L"World"), because the prefix for the second string is now treated as a user-defined literal suffix.


-> add spaces between concatenated strings



error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning


-> remove include of no required <hash_map>



error C2137: The illegal empty character constant L'' was used.


-> Instantiate the wchar_t string with L"" instead of the first character with L''



error C2065: 'PATH_MAX': undeclared identifier


-> PATH_MAX is not defined anymore in VC++ 2015

-> Add a new header file which contains this new constant (\Fdo\Unmanaged\Inc\Common\FdoLimits.h)

-> see "limits.h" from VC++ 2012

-> add additional inlcude path "(FDO)/Unmanaged/Inc" to the project




(odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol _vsnwprintf_s referenced in function StringCchPrintfW)

This is a breaking change in the Visual C++ runtime libraries in Visual Studio 2015. Mixing-and-matching object files compiled with different major versions of the Visual C++ libraries headers is not supported.

For several releases, the STL headers have enforced this via a #pragma detect_mismatch. The CRT headers have not enforced this, but it is nonetheless not supported.

In general, in cases where you want to support multiple major versions of Visual C++, we advise building libraries into DLLs in order to encapsulate CRT dependencies.

_vsnwprintf_s and other functions are not exported in appcrt140.dll, breaking linkage of static libraries. Add new library "legacy_stdio_definitions.lib" until it's fixed


-> Add new library "legacy_stdio_definitions.lib"


Best regards


fdo-internals mailing list
[hidden email]

Providers_GenericRdbms_Src_UnitTest_Common_MessageTest.cpp.patch (942 bytes) Download Attachment
Providers_GenericRdbms_Src_UnitTest_Common_FdoUpdateTest.cpp.patch (1K) Download Attachment
Providers_GenericRdbms_Src_Fdo_stdafx.h.patch (358 bytes) Download Attachment
Providers_GenericRdbms_Src_Fdo_Connection_FdoRdbmsConnection.cpp.patch (530 bytes) Download Attachment
Providers_GenericRdbms_Src_Util_trace.cpp.patch (5K) Download Attachment
Providers_GenericRdbms_Src_ODBC_Odbc.vcxproj.patch (8K) Download Attachment
Providers_GenericRdbms_Src_UnitTest_UnitTestOdbc.vcxproj.patch (13K) Download Attachment