1

https://github.com/GoogleCloudPlatform/google-cloud-cpp/ https://github.com/GoogleCloudPlatform/google-cloud-cpp/blob/master/google/cloud/storage/examples/storage_quickstart.cc

after building all available libraries, run storage_quickstart

/home/google-cloud-cpp/build-output/google/cloud/storage/examples/storage_quickstart bucket_name project_id

get this

Standard C++ exception raised: [json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input; expected '[', '{', or a literal

error at

namespace gcs = google::cloud::storage;
gcs::Client client;

Any ideas ?

Takashi Matsuo
  • 3,406
  • 16
  • 25
yutseho
  • 1,639
  • 1
  • 15
  • 27

1 Answers1

3

Looks like your GOOGLE_APPLICATION_DEFAULT_CREDENTIALS is not set, or is pointing to a file in the wrong format. Hopefully the documentation here:

https://googlecloudplatform.github.io/google-cloud-cpp/latest/storage/index.html

can help you troubleshoot this. Feel free to open a bug in the GitHub page if you need more help.

coryan
  • 723
  • 3
  • 5
  • My environment variable was not set correctly. Thanks a lot. – yutseho Oct 04 '18 at 02:07
  • For what is worth, we merged [#1212](https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/1212) which should produce much better error messages from now on. – coryan Oct 04 '18 at 16:56