You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you provide a TRACE level log? (sanitize any sensitive information)
/Users/yute/ccs-us-west/triton/native/s3-upl-retrieve.cpp:35:46: error: no viable conversion from 'shared_ptr<std::__1::basic_fstream<char, std::__1::char_traits<char> >>' to 'const shared_ptr<Aws::IOStream>'
const std::shared_ptr<Aws::IOStream> input_data =
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3703:23: note: candidate constructor not viable: no known conversion from 'std::shared_ptr<basic_fstream<char, char_traits<char> > >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
_LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;
^
Here is the program
#include <aws/s3/S3Client.h>
#include <aws/s3/model/PutObjectRequest.h>
#include <aws/s3/model/GetObjectRequest.h>
#include <aws/core/Aws.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::S3;
using namespace Aws::S3::Model;
static const char* KEY = "AKIAYUP244WDQOLCSQEK";
static const char* BUCKET = "hcs-poc-dev";
int main()
{
Aws::SDKOptions options;
Aws::Client::ClientConfiguration client_configuration;
client_configuration.region = Aws::Region::US_EAST_2;
Aws::InitAPI(options);
{
S3Client client(client_configuration);
//first put an object into s3
PutObjectRequest putObjectRequest;
putObjectRequest.WithKey(KEY)
.WithBucket(BUCKET);
//this can be any arbitrary stream (e.g. fstream, stringstream etc...)
std::string file_name("s3-sample");
const std::shared_ptr<Aws::IOStream> input_data =
Aws::MakeShared<Aws::FStream>("SampleAllocationTag",
file_name.c_str(),
std::ios_base::in | std::ios_base::binary);
putObjectRequest.SetBody(input_data);
auto putObjectOutcome = client.PutObject(putObjectRequest);
if(putObjectOutcome.IsSuccess())
{
std::cout << "Put object succeeded" << std::endl;
}
The text was updated successfully, but these errors were encountered:
In file included from /Users/yute/ccs-us-west/triton/native/s3-upl-retrieve.cpp:1:
In file included from /Users/yute/homebrew/include/aws/s3/S3Client.h:19:
In file included from /Users/yute/homebrew/include/aws/core/client/AWSError.h:19:
In file included from /Users/yute/homebrew/include/aws/core/utils/memory/stl/AWSString.h:20:
In file included from /Users/yute/homebrew/include/aws/core/utils/memory/stl/AWSAllocator.h:21:
In file included from /Users/yute/homebrew/include/aws/core/utils/memory/AWSMemory.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:652:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:3141:38: error: implicit instantiation of undefined template 'std::__1::basic_fstream<char, std::__1::char_traits<char> >'
: public integral_constant<bool, __is_constructible(_Tp, _Args...)>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4290:20: note: in instantiation of template class 'std::__1::is_constructible<std::__1::basic_fstream<char, std::__1::char_traits<char> >, const char *, unsigned int>' requested here
static_assert( is_constructible<_Tp, _Args...>::value, "Can't construct object in allocate_shared" );
...
In file included from /Users/yute/homebrew/include/aws/core/utils/memory/AWSMemory.h:22:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4290:5: error: static_assert failed due to requirement 'is_constructible<basic_fstream<char, char_traits<char> >, const char *, unsigned int>::value' "Can't construct object in allocate_shared"
static_assert( is_constructible<_Tp, _Args...>::value, "Can't construct object in allocate_shared" );
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4668:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<std::__1::basic_fstream<char, std::__1::char_traits<char> > >::allocate_shared<Aws::Allocator<std::__1::basic_fstream<char, std::__1::char_traits<char> > >, const char *, unsigned int>' requested here
return shared_ptr<_Tp>::allocate_shared(__a, _VSTD::forward<_Args>(__args)...);
^
What platform/OS are you using?
Darwin 17.7.0 Darwin Kernel Version 17.7.0: Wed Apr 24 21:17:24 PDT 2019; root:xnu-4570.71.45~1/RELEASE_X86_64 x86_64
Which version of the SDK?
master branch of aws-sdk-cpp repo
What compiler are you using? what version?
gcc
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
What are your CMake arguments?
cmake -Wc++11-extensions -I/Users/yute/homebrew/include -L/Users/yute/homebrew/lib/cmake –Daws-sdk-cpp_DIR=~/aws-sdk-cpp/build .
Can you provide a TRACE level log? (sanitize any sensitive information)
Here is the program
The text was updated successfully, but these errors were encountered: