Cpp errors

From PeerFreedom Wiki
Jump to navigation Jump to search

Post here common errors in C++ (in compilation, linking, etc) - error message plus the solution/description.

So that we can learn common errors to quickly identify them - mostly do post hard errors, that are not very obvious what is causing them.

/home/user/work/proje/depends/pfp-cpp/include/pfp-cpp/wallet/transaction.hpp:52: error: multiple definition of `n_pfp::n_crypto::operator<<(std::ostream&, n_pfp::n_crypto::t_coin_txid_output const&)'; CMakeFiles/tests.dir/src-test/test_wallet_coinnode.cpp.o:/home/user/work/proje/depends/pfp-cpp/include/pfp-cpp/wallet/transaction.hpp:52: first defined here

The function has been compiled more than once. Most likely the implementation is in the hpp file. Should be in cpp.