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

dysmsapi compilation error #5

Open
linhuifj opened this issue Sep 2, 2021 · 1 comment
Open

dysmsapi compilation error #5

linhuifj opened this issue Sep 2, 2021 · 1 comment

Comments

@linhuifj
Copy link

linhuifj commented Sep 2, 2021

-- alibabacloud_dysmsapi_20170525 : Project will be installed to /usr/local
-- Installing LIB components to /usr/local/lib
-- Installing BIN components to /usr/local/bin
-- Installing INCLUDE components to /usr/local/include
-- Installing CMAKE components to /usr/local/share/cmake/darabonba_util
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/alibaba/dysmsapi-20170525/cmake_build
[ 9%] Built target alibabacloud_endpoint_util
[ 36%] Built target darabonba_core
[ 59%] Built target darabonba_util
[ 68%] Built target alibabacloud_open_api_util
[ 81%] Built target alibabacloud_credential
[ 90%] Built target alibabacloud_open_api
Scanning dependencies of target alibabacloud_dysmsapi_20170525
[ 95%] Building CXX object CMakeFiles/alibabacloud_dysmsapi_20170525.dir/src/dysmsapi_20170525.cpp.o
/opt/alibaba/dysmsapi-20170525/src/dysmsapi_20170525.cpp: In member function ‘std::__cxx11::string Alibabacloud_Dysmsapi20170525::Client::getEndpoint(std::shared_ptr<std::__cxx11::basic_string >, std::shared_ptr<std::__cxx11::basic_string >, std::shared_ptr<std::__cxx11::basic_string >, std::shared_ptr<std::__cxx11::basic_string >, std::shared_ptr<std::__cxx11::basic_string >, std::shared_ptr<std::map<std::__cxx11::basic_string, std::__cxx11::basic_string > >, std::shared_ptr<std::__cxx11::basic_string >)’:
/opt/alibaba/dysmsapi-20170525/src/dysmsapi_20170525.cpp:41:142: error: no match for ‘operator[]’ (operand types are ‘std::__shared_ptr_access<std::map<std::__cxx11::basic_string, std::__cxx11::basic_string >, (__gnu_cxx::_Lock_policy)2, false, false>::element_type’ {aka ‘std::map<std::__cxx11::basic_string, std::__cxx11::basic_string >’} and ‘std::shared_ptr<std::__cxx11::basic_string >’)
Darabonba_Util::Client::isUnset<map<string, string>>(endpointMap) && !Darabonba_Util::Client::empty(make_shared((*endpointMap)[regionId]))) {

@linhuifj
Copy link
Author

linhuifj commented Sep 2, 2021

the code may need to be modified as:

string s = *regionId;

if (!Darabonba_Util::Client::isUnset<map<string, string>>(endpointMap) && !Darabonba_Util::Client::empty(make_shared((*endpointMap)[s])
)) {
return (*endpointMap)[s];
}

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

1 participant