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

Linker error on cloud_blob_container::create #266

Open
Clubbable opened this issue Jun 11, 2019 · 3 comments
Open

Linker error on cloud_blob_container::create #266

Clubbable opened this issue Jun 11, 2019 · 3 comments
Assignees

Comments

@Clubbable
Copy link

Clubbable commented Jun 11, 2019

Hi, I am trying to compile the Azure Storage CPP library into static libs, so that I can integrate into my Unreal Project. I have been following the tutorial outlined here: https://docs.microsoft.com/en-us/sandbox/gamedev/unreal/azure-storage-unreal

Currently, I have the following static libs compiled:

"wastorage.lib",
"cpprest_2_10.lib",
"zlib.lib",
"bcrypt.lib",
"xmllite.lib",
"crypt32.lib",
"winhttp.lib",
"libeay32.lib",
"ssleay32.lib",
"boost_system-vc140-mt.lib",
"atls.lib",
"RpcRT4.lib",
"winhttp.lib",
"cpprest120_2_9.lib",
"cpprest140_2_9.lib"

However, when I try to run the following code, I am still getting a compile error on create_async()

#include "AzureStorage/Public/was/storage_account.h"
#include "AzureStorage/Public/was/blob.h"
#include "AzureStorage/Public/cpprest/details/basic_types.h"

const utility::string_t storage_connection_string(U("some string"));
	azure::storage::cloud_storage_account storage_account = azure::storage::cloud_storage_account::parse(storage_connection_string);
```

	// Create the blob client.
	azure::storage::cloud_blob_client blob_client = storage_account.create_cloud_blob_client();

	// Retrieve a reference to a previously created container.
	azure::storage::cloud_blob_container container = blob_client.get_container_reference(U("container"));

	// Output URI of each item.
	container.create();
`

This is the compile error I get:
`error LNK2019: unresolved external symbol "public: class Concurrency::task<void> __cdecl azure::storage::cloud_blob_container::create_async(enum azure::storage::blob_container_public_access_type,class azure::storage::blob_request_options const &,class azure::storage::operation_context)" (?create_async@cloud_blob_container@storage@azure@@QEAA?AV?$task@X@Concurrency@@W4blob_container_public_access_type@23@AEBVblob_request_options@23@Voperation_context@23@@Z) referenced in function "public: class Concurrency::task<void> __cdecl azure::storage::cloud_blob_container::create_async(void)" (?create_async@cloud_blob_container@storage@azure@@QEAA?AV?$task@X@Concurrency@@XZ)`

Am I still missing some static libs that I need to import?
@katmsft
Copy link
Member

katmsft commented Jun 12, 2019

Can you try this?
Before including azure-storage-cpp's headers, define following macro:

#define _NO_WASTORAGE_API

@Clubbable
Copy link
Author

I have tried this, unfortunately it didn't make any difference.

@katmsft katmsft self-assigned this Jun 12, 2019
@katmsft
Copy link
Member

katmsft commented Jun 12, 2019

Can you reference this page and see what is missing?

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