Closed Tar-Palantir closed 5 years ago
I use a external library in my contract - biginteger-for-eosio. But when I compile my contract code, it shows wasm error:
~/Projects/Server/contracts/chain# eosio-cpp -abigen chain.cpp -o chain.wasm /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsigned::BigUnsigned(unsigned long) /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsigned::operator*(BigUnsigned const&) const /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsigned::operator&(BigUnsigned const&) const /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsigned::operator%(BigUnsigned const&) const /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsigned::toUnsignedInt() const /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsignedInABase::BigUnsignedInABase(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned short) /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: undefined symbol: BigUnsignedInABase::operator BigUnsigned() const Warning, empty ricardian clause file Warning, empty ricardian clause file Warning, action <init> does not have a ricardian contract Warning, action <test> does not have a ricardian contract
Then I tried that I add the library code files to compile, like this:
~/Projects/Server/contracts/chain# eosio-cpp -abigen -o chain.wasm chain.cpp eos_mem_wrapper.cpp BigInteger.cpp BigIntegerAlgorithms.cpp BigIntegerUtils.cpp BigUnsigned.cpp BigUnsignedInABase.cpp clang-7: error: cannot specify -o when generating multiple output files /usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/bin/wasm-ld: error: chain.wasm: not a relocatable wasm file Warning, empty ricardian clause file Warning, empty ricardian clause file Warning, action <init> does not have a ricardian contract Warning, action <test> does not have a ricardian contract
Even if I removed the option "-o chain.wasm", the error still show.
I fixed by including all I used cpp files.
I use a external library in my contract - biginteger-for-eosio. But when I compile my contract code, it shows wasm error:
Then I tried that I add the library code files to compile, like this:
Even if I removed the option "-o chain.wasm", the error still show.