aws-sdk-cpp: Problem linking with Visual Studio 2017
I’m a new AWS developer so I may be doing something wrong, but I’ve done lots of searching and can’t seem to find a solution to this problem.
I’m using VS 2017 Community Edition, Version 15.1 (26403.7) Release, trying to build just a simple AWS S3 Test program. I followed the instructions from the Developers Blog to install (using NuGet) AWSSDKCPP-S3 v1.0.20060301.128 (which installs AWSSDKCPP-Core v1.0.128.) The two packages show up in the Project Property pages under “Referenced Packages” as Linkage: Dynamic Library (DLL). My target environment is Windows x64 Debug (for now.)
The include files and paths seem to have been installed okay, and compiles complete without error. But when VS gets to the link stage, it can’t seem to find the library functions. For a simple program:
int main()
{
Aws::SDKOptions options;
Aws::InitAPI(options);
std::cout << "Hello, AWS World!" << std::endl;
}
VS gives the error:
error LNK2019: unresolved external symbol "void __cdecl Aws::InitAPI(struct Aws::SDKOptions const &)" (?InitAPI@Aws@@YAXAEBUSDKOptions@1@@Z) referenced in function main
Is this behavior happening because I’m using VS 2017 and the NuGet packages are for an earlier version of VS? If so, is there a temporary alternative until the NuGet Packages are updated, i.e., specifying libraries directly in the VS Properties? Or do I have to go through the entire library build process?
(As a workaround, I tried specifying actual library names as input to the linker and that almost worked–but I’m still getting an unresolved external on Aws::Http::CONTENT_TYPE_HEADER. But that may be due to not having the correct libraries included or something.)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 17 (5 by maintainers)
Hi, thanks for your inquiry. We are working on the last step of this problem and should deliver it soon. I will let you know once done.
The NuGet package should be updated for v141 which is what VS2017 is – 140 is VS2015.
Guys, the nuget packages for VS2017(V141) have been updated and now accessible in Nuget package manage tools.