c++ sample
#1817
Replies: 2 comments 1 reply
-
Have you tried to build it directly, not inside Docker? Docker image we do not officially support. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Sample app building fails, if selected compiler is not clang. On Ubuntu/Linux, often gcc is picked by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm having a issue using cpp sample for wallet core. Docker image is getting build successfully but I cant make cpp sample. Here are the commands I've used (repository is fully up to date):
docker build . --tag wallet-core-dev
(build successfully. I have tested this with ubuntu 18.04 and 20.04)
docker run -i -t wallet-core-dev /bin/bash
inside docker image:
./tools/generate-files
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug
make -Cbuild
cd samples/cpp
cmake . -DWALLET_CORE=../../
make
on the last command I encounter a long list of errors but the last part is like this:
/wallet-core/src/Cardano/AddressV2.cpp:25: undefined reference to
std::invalid_argument::invalid_argument(char const*)' /wallet-core/src/Cardano/AddressV2.cpp:29: undefined reference to
std::invalid_argument::invalid_argument(char const*)'/wallet-core/src/Cardano/AddressV2.cpp:33: undefined reference to
std::invalid_argument::invalid_argument(char const*)' /wallet-core/samples/cpp/../../build/libTrustWalletCore.a(AddressV2.cpp.o):/wallet-core/src/Cardano/AddressV2.cpp:39: more undefined references to
std::invalid_argument::invalid_argument(char const*)' follow/wallet-core/samples/cpp/../../build/libprotobuf.a(stringpiece.cc.o): In function
google::protobuf::operator<<(std::ostream&, google::protobuf::StringPiece)': /wallet-core/build/local/src/protobuf/protobuf-3.14.0/src/google/protobuf/stubs/stringpiece.cc:43: undefined reference to
std::ostream::write(char const*, long)'clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/sample.dir/build.make:97: sample] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sample.dir/all] Error 2
Beta Was this translation helpful? Give feedback.
All reactions