Difference in static linking between aws-sdk-cpp 1.4 and 1.5/1.6 causes mismatch error?

274 Views Asked by At

I've got a problem with the Core and S3 libraries and static linking of x64 Windows that I can reproduce in a small console application in Visual Studio 2017 v15.8.4.

With the 1.4 libraries (exact versions below) obtained from NuGet, both the x86 and x64 versions of my program link fine with the linkage of AWSSDKCPP-Core and AWSSDKCPP-S3 set to static. If I update to 1.5 or 1.6, the exact same project links fine in x86, but in x64 has the link error:

Searching libraries
Searching C:\Users\Jeff\Documents\Visual Studio 2017\Projects\ConsoleApplication20\packages\AWSSDKCPP-S3.1.6.20060301.11\build\native\..\..\\build\native\lib\x64\Debug\v141\static\aws-cpp-sdk-s3.lib:
Found "public: __cdecl Aws::S3::S3Client::S3Client(class Aws::Auth::AWSCredentials const &,struct Aws::Client::ClientConfiguration const &,enum Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy,bool)" (??0S3Client@S3@Aws@@QEAA@AEBVAWSCredentials@Auth@2@AEBUClientConfiguration@Client@2@W4PayloadSigningPolicy@AWSAuthV4Signer@62@_N@Z)
Referenced in ConsoleApplication20.obj
Loaded aws-cpp-sdk-s3.lib(ub_S3.obj)
aws-cpp-sdk-s3.lib(ub_S3.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in ConsoleApplication20.obj

I don't know why it thinks the RuntimeLibrary value for aws-cpp-sdk-s3.lib is Dynamic when I have it set to static and it linked in previous versions (and in x86 with the same version). Could the x64 static libraries in 1.5/1.6 have a dependency that they're not supposed to have? Is there a workaround?

Versions: AWSSDKCPP-Core 1.4.93 / 1.6.11 AWSSDKCPP-S3 1.4.20060301.93 / 1.6.20060301.11

1

There are 1 best solutions below

0
On BEST ANSWER

The problem has been fixed in 1.6.24.