Aws-sdk-cpp: AWS C++ application Link error with windows header files

Created on 27 Jan 2017  Â·  3Comments  Â·  Source: aws/aws-sdk-cpp

Hi,

I have compiled aws c++ SDK successfuly.

I have an application which will access the s3 storage creating bucket,getobject etc., compiled and working well n fine.

But when i add any windows header (#include/ #include ), Its showing the
following Link error,

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "public: virtual class Aws::Utils::Outcome > __cdecl Aws::S3::S3Client::GetObjectW(class Aws::S3::Model::GetObjectRequest const &)const " (?GetObjectW@S3Client@S3@Aws@@UEBA?AV?$Outcome@VGetObjectResult@Model@S3@Aws@@V?$AWSError@W4S3Errors@S3@Aws@@@Client@4@@Utils@3@AEBVGetObjectRequest@Model@23@@Z) aws2 C:\Usersnandang\Documents\Visual Studio 2015\Projectsaws2aws2aws2.obj 1

Note: If i remove the windows headers, it builds successfully.
I need to use CreateThread and socket API's in my application.

Please suggest!!

help wanted

All 3 comments

windows header has some #define entries such as GetObject that need to be #undef d. As for CreateThread, why not just use std::thread?

Sent from my iPhone

On Jan 27, 2017, at 6:13 AM, N1N notifications@github.com wrote:

Hi,

I have compiled aws c++ SDK successfuly.

I have an application which will access the s3 storage creating bucket,getobject etc., compiled and working well n fine.

But when i add any windows header (#include/ #include ), Its showing the
following Link error,

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "public: virtual class Aws::Utils::Outcome

Note: If i remove the windows headers, it builds successfully.
I need to use CreateThread and socket API's in my application.

Please suggest!!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I would also advise partitioning your platform-specific code from the platform-agnostic code if possible.

@JonathanHenson @bretambrose Thank you! It worked!! Also i'll try with std::thread.

Was this page helpful?
0 / 5 - 0 ratings