atof、strtouf unresolveable
cleos set contract XXXX XXXXXX/XXXXXX Using already assembled WASM... Publishing contract... Error 3070000: WASM Exception Error Details: env.atof unresolveable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pending console output: Stack Trace: wasm_interface.hpp:42 resolve wasm_interface.hpp:44 resolve apply_context.cpp:61 exec_one
same issue, can not convert string to float.
Use strtof(), strtod(), or strtold(), all of which are available. The wcs variants are not available.
I just tried to use strtod as follows:
quantity = std::strtod(str_quantity.c_str(), nullptr);
When setting the contract, I get the following error:
Using already assembled WASM...
Publishing contract...
Error 3070000: WASM Exception
Error Details:
env.strtod unresolveable
pending console output:
Be sure your contract is linked against libc.bc. eosiocpp attempts to do this for you with the ${EOSIO_INSTALL_DIR}/usr/share/eosio/contractsdk/lib/libc.bc argument to llvm-link. The system contracts do it by adding the LIBRARIES libc argument to the add_wast_executable macro in their respective CMakeLists.txt.
I got the same issue
Use eosio.wasmsdk as it has better support.
how to use eosio.wasmsdk?
Eosio.wasmsk has been renamed to eosio.cdt. It can be found here: https://github.com/EOSIO/eosio.cdt. It includes some instructions. More documentation will be released soon.
got the same issue...