简体   繁体   中英

How do I compile C++ code including Google Cloud Storage library?

I'm trying to use Cloud Storage C++ Client Library

I've installed it following instructions

When I try to compile it using g++, compilation/linking failing with the following error:

undefined reference to 'google::cloud::storage::v0::Client::CreateDefaultClient()'

Where can I find compiling/building instructions for cpp google cloud SDK.

I had to compile it with these flags $(pkg-config --cflags storage_client libcurl openssl google_cloud_cpp_common libcares)

and link it with these flags $(pkg-config --libs storage_client libcurl openssl google_cloud_cpp_common libcares) -lcrc32c

For some reason default installation of crc32c was not fine, so I had to clone git repository and follow installation instruction there to fix it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM