Skip to content

How to use AWS SDK purely statically #1900

Answered by jkaplan55
HavenRemix asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to successfully use the SDK as a static library in my project by building it with FORCE_SHARED_CRT=ON and BUILD_SHARE_LIBS=OFF.

When both are off, I got errors when trying to build the SDK binaries after generating them with CMAKE. With the configuration above, I was able to generate, build, and install. Afterward I had a bunch of lib files in my install directly that I was able to link to successfully.

As david-haim-sentinelone mentioned above, "It seems like there are only two mutually exclusive options here - link statically with dynamic CRT or link dynamically with static CRT."

I may be falling into first category there. But I did have success with it. I was browsing this b…

Replies: 8 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jkaplan55
Comment options

Answer selected by jmklix
@jmklix
Comment options

Comment options

You must be logged in to vote
2 replies
@da40
Comment options

@jmklix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
8 participants
Converted from issue

This discussion was converted from issue #1892 on April 05, 2022 17:32.