Hello,
When I create an instance of the classes Aws::EC2::Model::CreateSecurityGroupRequest or
Aws::EC2::Model::AuthorizeSecurityGroupIngressRequest, I am getting a linker error :
error LNK2001: unresolved external symbol "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3PBDB)
I'm using visual studio 2013 on windows 7 and AWS Version 0.12.3.
I have noticed that the string is declared in aws-sdk-core and I have included aws-sdk-core.lib in my project (it is a depedency anyway),but still I'm getting the above linker error.
We have encountered this problem sporadically in the past. Are you linking statically? Can you find that symbol (or any of the other extern strings its declared next to) if you dumpbin /symbols on aws-cpp-sdk-core.lib?
Having the same issue with Visual Studio 2015. But only if I use the x64 - version.
This issue is usually caused by a missing dll import call. We just improved this on our latest push to make it easier to do this right.
For now, can you wipe out everything you've done in your project properties related to the SDK and try using Nuget package AWSSDKCPP-EC2?
It will make sure your project is setup properly for each target.
Sent from my iPhone
On Jul 14, 2016, at 9:06 AM, Thomas [email protected] wrote:
Having the same issue with Visual Studio 2015. But only if use the x64 - version.
—
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 have AWSSDKCPP-Core + Redist and AWSSDKCPP-SQS & Redist. Not sure if that causes some conflicts?
/Update: Tried removing the Core Package but it is a dependency for SQS it seems
Is your issue with EC2 or SQS? Do you need the EC2 binary? Anyways there should be no conflicts.
Sent from my iPhone
On Jul 14, 2016, at 9:24 AM, Thomas [email protected] wrote:
I have AWSSDKCPP-Core + redist and AWSSDKCPP-SQS & Redist. Not sure if that causes some conflicts?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
For me at least I am using the SQS - SDK but the error-message is the same that was mentioned in the first post "error LNK2001: unresolved external symbol "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3PBDB)"
And the error happens when you use the NuGet package?
Sent from my iPhone
On Jul 14, 2016, at 9:28 AM, Thomas [email protected] wrote:
For me at least I am using the SQS - SDK but the error-message is the same that was mentioned in the first post
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
That is excatly what I used. I can send you a Visual Studio Solution Example project if that helps
What version? Can you try updating to latest?
Sent from my iPhone
On Jul 14, 2016, at 10:26 PM, Thomas [email protected] wrote:
That is excatly what I used. I can send you a Visual Studio Solution if that helps
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Will try. I was working with 0.13.4
Still getting the same issue with 0.13.5 (Tried clean & rebuild) -> x64 / Release
AWSSDKCPP-transfer is not available through NuGet. Is there any plan to release through it in the near future?
There is, I keep messing up the export. I'll try and get this updated as soon as possible.
Hello, I was exactly with the same problem while trying to compile the example code;
Https://aws.amazon.com/blogs/developer/using-cmake-exports-with-the-aws-sdk-for-c/
Before, I had generated the project by CMake using the default settings.
To get compile with success, I changed the BUILD_SHARED_LIBS flag to false;
I'm using Visual Studio Community 2015/up3 on Windows 10 and https://github.com/aws/aws-sdk-cpp downloaded yesterday.
Since I did not use NuGet, I changed the following properties in the project in Visual Studio (Some settings I compared with the S3 SDK project);
[VC++ Directories]
Include Directories
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-core\include;
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-s3\include;
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-s3-encryption\include;
Library Directories
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-core\Debug;
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-s3\Debug;
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-s3-encryption\Debug;
[C/C++ >> General]
Additional Include Directories
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-core\include;
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-s3\include;
C:\Dev\AWS\aws-sdk-cpp-master\aws-cpp-sdk-s3-encryption\include;
[Linker >> General]
Additional Library Directories
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-core\Debug;
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-s3\Debug;
C:\Dev\AWS\aws-sdk-cpp-bin\aws-cpp-sdk-s3-encryption\Debug;
[Linker >> Input]
Additional Dependencies
aws-cpp-sdk-core.lib;
aws-cpp-sdk-s3.lib;
aws-cpp-sdk-s3-encryption.lib;
[C/C++ >> Preprocessor]
Preprocessor Definitions
WIN32;_WINDOWS;_DEBUG;_CONSOLE;PLATFORM_WINDOWS;ENABLE_BCRYPT_ENCRYPTION;ENABLE_WINDOWS_CLIENT;AWS_S3_EXPORTS;USE_WINDOWS_DLL_SEMANTICS;CMAKE_INTDIR="Debug";aws_cpp_sdk_s3_EXPORTS;%(PreprocessorDefinitions)
I am coming to this late but cloning the git repository and building locally then using the LIB/DLL combo in a simple console test program I had the same 'unresolved external' linker error. I resolved it by adding these pre-processor defines to my console test program's project:
USE_WINDOWS_DLL_SEMANTICS
USE_IMPORT_EXPORT
These affect what AWS_CORE_API becomes in the header files. See aws/core/Core_Exports.h.
Can this issue be fixed in the SDK?
This should have been fixed, please follow the instructions in this issue. Reopen if you still have problem.
Most helpful comment
I am coming to this late but cloning the git repository and building locally then using the LIB/DLL combo in a simple console test program I had the same 'unresolved external' linker error. I resolved it by adding these pre-processor defines to my console test program's project:
USE_WINDOWS_DLL_SEMANTICS
USE_IMPORT_EXPORT
These affect what AWS_CORE_API becomes in the header files. See aws/core/Core_Exports.h.