Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static linking for Windows not working? #41

Closed
HarmlessDave opened this issue Nov 12, 2015 · 2 comments
Closed

Static linking for Windows not working? #41

HarmlessDave opened this issue Nov 12, 2015 · 2 comments

Comments

@HarmlessDave
Copy link

This is to use the SDK with a native C++ 32-bit app, plain Win32 not MFC.

I tried both of these from a command prompt but Visual Studio shows the project as using a shared DLL:

E:\cmake-3.1.2-win32-x86\bin\cmake e:\vs12\aws-sdk-cpp-20151111 -G "Visual Studio 12" -STATIC=1

E:\cmake-3.1.2-win32-x86\bin\cmake e:\vs12\aws-sdk-cpp-20151111 -G "Visual Studio 12" -STATIC_LINKING=1

I tried changing the aws-cpp-sdk-core solution in VS2013 from shared DLL to static (/MT and /MTd) and get build errors:

2>E:\VS12\aws-sdk-cpp-20151111\aws-cpp-sdk-core\include\aws/core/utils/stream/ResponseStream.h(49): error C2220: warning treated as error - no 'object' file generated
2>E:\VS12\aws-sdk-cpp-20151111\aws-cpp-sdk-core\include\aws/core/utils/stream/ResponseStream.h(49): warning C4275: non dll-interface class 'std::ios_base' used as base for dll-interface class 'std::basic_ios<char,std::char_traits<char>>'
2>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xiosbase(200) : see declaration of 'std::ios_base'

Do I need to do something else in Cmake to get a static project?

@bretambrose
Copy link
Contributor

Try -DSTATIC_LINKING=1

@HarmlessDave
Copy link
Author

Thanks, that fixed it, I just then needed to change the C++ library link from DLL to static.

Our app is Unicode and this library is only able to build as MBCS. I'll find out soon whether or not they will work together.

krzysztof-trzepla pushed a commit to krzysztof-trzepla/aws-sdk-cpp that referenced this issue May 21, 2016
…k-message-counter to develop

# By Łukasz Opioła
# Via Łukasz Opioła
* commit '5b82f729c327ddb36deab09d6c5dd02b4da377a5':
  VFS-1149, add new endpoint for all messages count
  VFS-1149, add new endpoint for all messages count
JonathanHenson added a commit that referenced this issue Nov 15, 2016
Move external project installs and source into build directory
cobookman pushed a commit to cobookman/aws-sdk-cpp that referenced this issue Jan 17, 2022
* Integrate aws-c-auth; logging; misc tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants