diff --git a/CMakeLists.txt b/CMakeLists.txt index 66a16d8..55bc81e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,5 +283,60 @@ target_link_libraries(scratchpad multisig version + ${EXTRA_LIBRARIES} +) + +######################## +# Build C++ library +######################## + +set( + LIBRARY_SRC_FILES + src/wallet/MoneroWallet.cpp +) + +add_library(monero-cpp ${LIBRARY_SRC_FILES}) + +target_link_libraries(monero-cpp + + hidapi + + boost_chrono + boost_date_time + boost_filesystem + boost_program_options + boost_regex + boost_serialization + boost_wserialization + boost_system + boost_thread + + ssl + crypto + + wallet_merged + #wallet_api + wallet + lmdb + epee + unbound + sodium + easylogging + + cryptonote_core + cryptonote_basic + mnemonics + ringct + ringct_basic + common + cncrypto + blockchain_db + blocks + checkpoints + device + device_trezor + multisig + version + ${EXTRA_LIBRARIES} ) \ No newline at end of file diff --git a/bin/build-scratchpad.sh b/bin/build-libmonero-cpp.sh similarity index 100% rename from bin/build-scratchpad.sh rename to bin/build-libmonero-cpp.sh diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index b959744..c817e40 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -1,4 +1,9 @@ +#include +#include +#include "MoneroWallet.h" + using namespace std; +using namespace epee; MoneroWallet::MoneroWallet() { cout << "MoneroWallet()" << endl; @@ -34,6 +39,6 @@ void MoneroWallet::getMnemonic(epee::wipeable_string& mnemonic) const { throw runtime_error("Not implemented"); } -void MoneroWallet::setDaemonConnection(const string& daemonUri, const string& daemonUsername, const const epee::wipeable_string& daemonPassword) { +void MoneroWallet::setDaemonConnection(const string& daemonUri, const string& daemonUsername, const epee::wipeable_string& daemonPassword) { throw runtime_error("Not implemented"); } diff --git a/src/wallet/MoneroWallet.h b/src/wallet/MoneroWallet.h index 347dea7..86c0e0e 100644 --- a/src/wallet/MoneroWallet.h +++ b/src/wallet/MoneroWallet.h @@ -1,7 +1,15 @@ +#include "include_base_utils.h" +#include "cryptonote_basic/cryptonote_basic_impl.h" +#include "wallet/wallet2.h" + using namespace std; using namespace crypto; using namespace cryptonote; +//int main(int argc, const char* argv[]) { +// cout << "===== MAIN =====" << endl; +//} + /** * Monero wallet interface. * @@ -71,7 +79,7 @@ using namespace cryptonote; * @param daemonUsername is the daemon's username * @param daemonPassword is the daemon's password */ - void setDaemonConnection(const string& daemonUri, const string& daemonUsername, const const epee::wipeable_string& daemonPassword); + void setDaemonConnection(const string& daemonUri, const string& daemonUsername, const epee::wipeable_string& daemonPassword); // /** // * Get the wallet's seed. diff --git a/test/Scratchpad.cpp b/test/Scratchpad.cpp index e774b06..7851f8e 100644 --- a/test/Scratchpad.cpp +++ b/test/Scratchpad.cpp @@ -1,7 +1,6 @@ #include #include #include "wallet2.h" -#include "wallet/MoneroWallet.h" #include "wallet/MoneroWallet.cpp" //#include using namespace std;