aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

AWS C++ SDK not compiling in Visual Studio 2019 #2955

Closed tagopinath closed 6 months ago

tagopinath commented 6 months ago

Describe the bug

was using AWS C++ SDK in visual studio 2015 for one of our project. Now, we are trying to update the project from visual studio 2015 to visual studio 2019 (community edition). While compiling, I got this linker error.

error LNK2001: unresolved external symbol "declspec(dllimport) void cdecl Aws::ShutdownAPI(struct Aws::SDKOptions const &)" (_imp?ShutdownAPI@Aws@@YAXAEBUSDKOptions@1@@z) error LNK2001: unresolved external symbol "declspec(dllimport) void cdecl Aws::InitAPI(struct Aws::SDKOptions const &)" (_imp?InitAPI@Aws@@YAXAEBUSDKOptions@1@@z)

Expected Behavior

Should work like as VS 2015

Current Behavior

Getting linker error

Reproduction Steps

Just create a simple application, add packages, call InitAPI, you will get this linker error

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.6.25

Compiler and Version used

Visual Studio 2019 (community edition)

Operating System and version

Windows 10

sbiscigl commented 6 months ago

AWS CPP SDK version used 1.6.25

Thats a really old version and we wont be pushing any changes to old minor versions. Is there anything preventing you from using the latest version? Do you see any issues using the latest version?

SergeyRyabinin commented 6 months ago

Hello, 1.6.25 is a really old version, we would not be able to provide any code fix on that version.

Regarding your issue description, it seems that linker fails to find the AWS CPP SDK built libraries. Could you please specify how you build the SDK and how you are linking it to your application?

Best regards

tagopinath commented 6 months ago

Hello,

Previously i was connecting to AWS by downloading using Package Manager inside Visual studio itself. It works fine in VS 2015 and not VS 2019.

Now, i downloaded the code and compiled directly in VS 2019 and included header and lib files (whichever needed for our project), now i am able to compile and get the result.

Thank you both.

Regards, Gopi.

github-actions[bot] commented 6 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.