Skip to content

How to statically link against azure storage cpp in visual studio.

Kan Tang edited this page Jun 12, 2019 · 1 revision
  1. Install azure storage cpp via Vcpkg:
vcpkg install azure-storage-cpp --triplet x64-windows-static
  1. Before including azure-storage-cpp's headers, define following macro:
#define _NO_WASTORAGE_API
  1. In the project's Configuration Properties -> C/C++ -> Code Generation -> Runtime Library: Select Multi-threaded or Multithreaded Debug

  2. Configuration Properties -> Linker -> Input -> Additional Dependencies:

bcrypt.lib
xmllite.lib
Rpcrt4.lib
Crypt32.lib
Winhttp.lib
  1. In .vcproj file:
	<PropertyGroup Label="Globals">
	<!-- .... -->
	<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
	<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
	</PropertyGroup>

Then build as normally do.