woodser / monero-cpp Goto Github PK
View Code? Open in Web Editor NEWC++ library for using Monero
Home Page: https://woodser.github.io/monero-cpp/doxygen/annotated.html
License: MIT License
C++ library for using Monero
Home Page: https://woodser.github.io/monero-cpp/doxygen/annotated.html
License: MIT License
../external-libs/monero-core/libwallet_merged.a(messages-management.pb.cc.o):messages-management.pb.cc:(.text+0x2644): more undefined references to google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*)' follow ../external-libs/monero-core/libwallet_merged.a(messages-management.pb.cc.o): In function
hw::trezor::messages::management::Initialize::MergeFrom(google::protobuf::Message const&)':
messages-management.pb.cc:(.text+0x646d): undefined reference to google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)' ../external-libs/monero-core/libwallet_merged.a(messages-management.pb.cc.o): In function
hw::trezor::messages::management::Features::MergeFrom(google::protobuf::Message const&)':
messages-management.pb.cc:(.text+0x696d): undefined reference to google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)' ../external-libs/monero-core/libwallet_merged.a(messages-management.pb.cc.o): In function
hw::trezor::messages::management::ApplySettings::MergeFrom(google::protobuf::Message const&)':
messages-management.pb.cc:(.text+0x6bad): undefined reference to google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)' ../external-libs/monero-core/libwallet_merged.a(messages-management.pb.cc.o): In function
hw::trezor::messages::management::Ping::MergeFrom(google::protobuf::Message const&)':
messages-management.pb.cc:(.text+0x6d3d): undefined reference to `google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)'
......
......
../external-libs/monero-core/libunbound.a(keyraw.c.o): In function sldns_key_buf2dsa_raw': keyraw.c:(.text+0x144): undefined reference to
BN_bin2bn'
keyraw.c:(.text+0x154): undefined reference to BN_bin2bn' keyraw.c:(.text+0x16e): undefined reference to
BN_bin2bn'
keyraw.c:(.text+0x189): undefined reference to BN_bin2bn' keyraw.c:(.text+0x1a9): undefined reference to
DSA_new'
keyraw.c:(.text+0x1c2): undefined reference to DSA_set0_pqg' keyraw.c:(.text+0x1d3): undefined reference to
DSA_set0_key'
keyraw.c:(.text+0x1f6): undefined reference to BN_free' keyraw.c:(.text+0x1fe): undefined reference to
BN_free'
keyraw.c:(.text+0x207): undefined reference to BN_free' keyraw.c:(.text+0x20f): undefined reference to
BN_free'
keyraw.c:(.text+0x226): undefined reference to DSA_free' keyraw.c:(.text+0x22e): undefined reference to
BN_free'
keyraw.c:(.text+0x23c): undefined reference to BN_free' keyraw.c:(.text+0x244): undefined reference to
BN_free'
keyraw.c:(.text+0x24d): undefined reference to BN_free' keyraw.c:(.text+0x255): undefined reference to
DSA_free'
keyraw.c:(.text+0x25d): undefined reference to BN_free' ../external-libs/monero-core/libunbound.a(keyraw.c.o): In function
sldns_key_buf2rsa_raw':
keyraw.c:(.text+0x2b6): undefined reference to BN_new' keyraw.c:(.text+0x2d5): undefined reference to
BN_bin2bn'
keyraw.c:(.text+0x2da): undefined reference to BN_new' keyraw.c:(.text+0x2fe): undefined reference to
BN_bin2bn'
keyraw.c:(.text+0x303): undefined reference to RSA_new' keyraw.c:(.text+0x31f): undefined reference to
RSA_set0_key'
keyraw.c:(.text+0x374): undefined reference to BN_free' keyraw.c:(.text+0x37c): undefined reference to
BN_free'
keyraw.c:(.text+0x386): undefined reference to RSA_free' keyraw.c:(.text+0x396): undefined reference to
BN_free'
keyraw.c:(.text+0x3a4): undefined reference to BN_free' keyraw.c:(.text+0x3ac): undefined reference to
BN_free'
......
......
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine9put_inputERKNS0_12const_bufferE[_ZN5boost4asio3ssl6detail6engine9put_inputERKNS0_12const_bufferE]+0x4e): undefined reference to BIO_write' CMakeFiles/sample_code.dir/src/wallet/monero_wallet_core.cpp.o: In function
boost::asio::ssl::detail::engine::map_error_code(boost::system::error_code&) const':
monero_wallet_core.cpp:(.text._ZNK5boost4asio3ssl6detail6engine14map_error_codeERNS_6system10error_codeE[_ZNK5boost4asio3ssl6detail6engine14map_error_codeERNS_6system10error_codeE]+0x6d): undefined reference to BIO_ctrl' monero_wallet_core.cpp:(.text._ZNK5boost4asio3ssl6detail6engine14map_error_codeERNS_6system10error_codeE[_ZNK5boost4asio3ssl6detail6engine14map_error_codeERNS_6system10error_codeE]+0x9c): undefined reference to
SSL_get_shutdown'
CMakeFiles/sample_code.dir/src/wallet/monero_wallet_core.cpp.o: In function boost::asio::ssl::detail::engine::perform(int (boost::asio::ssl::detail::engine::*)(void*, unsigned long), void*, unsigned long, boost::system::error_code&, unsigned long*)': monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm[_ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm]+0x4c): undefined reference to
BIO_ctrl_pending'
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm[_ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm]+0x55): undefined reference to ERR_clear_error' monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm[_ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm]+0xb9): undefined reference to
SSL_get_error'
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm[_ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm]+0xc1): undefined reference to ERR_get_error' monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm[_ZN5boost4asio3ssl6detail6engine7performEMS3_FiPvmES4_mRNS_6system10error_codeEPm]+0xd4): undefined reference to
BIO_ctrl_pending'
CMakeFiles/sample_code.dir/src/wallet/monero_wallet_core.cpp.o: In function boost::asio::ssl::detail::engine::do_shutdown(void*, unsigned long)': monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine11do_shutdownEPvm[_ZN5boost4asio3ssl6detail6engine11do_shutdownEPvm]+0x1f): undefined reference to
SSL_shutdown'
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine11do_shutdownEPvm[_ZN5boost4asio3ssl6detail6engine11do_shutdownEPvm]+0x37): undefined reference to SSL_shutdown' CMakeFiles/sample_code.dir/src/wallet/monero_wallet_core.cpp.o: In function
boost::asio::ssl::detail::engine::do_read(void*, unsigned long)':
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine7do_readEPvm[_ZN5boost4asio3ssl6detail6engine7do_readEPvm]+0x3d): undefined reference to SSL_read' CMakeFiles/sample_code.dir/src/wallet/monero_wallet_core.cpp.o: In function
boost::asio::ssl::detail::engine::do_write(void*, unsigned long)':
monero_wallet_core.cpp:(.text._ZN5boost4asio3ssl6detail6engine8do_writeEPvm[_ZN5boost4asio3ssl6detail6engine8do_writeEPvm]+0x3d): undefined reference to `SSL_write'
collect2: error: ld returned 1 exit status
This issue requests porting this library's Java counterpart's JUnit test suite to C++ for use in this library.
Currently, the Java library tests the C++ library through the JNI interface. A native C++ test suite would allow more thorough testing of C++ references and remove depending on the Java project for tests.
This issue tests the bounty system.
I'm having some trouble linking the monero-cpp library to my simple project. I created a simple test project to help you figure out what exactly is going wrong. We are talking about MSYS2 MinGW64 assembly on Windows 10 x64.
And so what needs to be done:
git clone [email protected]:sdcwen/monero-test.git
cd ./monero-test/
git submodule update --init
cd ./external/monero-cpp/
git checkout v0.7.6
cd ../../
Then you need to replace monero-test/external/monero-cpp/CMakeLists.txt
with the monero-test/patch/CMakeLists.txt
file. This file contains some fixes that allow you to add monero-cpp
via add_subdirectory
to your project.
-set(MONERO_PROJECT "${CMAKE_SOURCE_DIR}/external/monero-project" CACHE STRING "Monero project source directory")
+set(MONERO_PROJECT "${CMAKE_CURRENT_LIST_DIR}/external/monero-project" CACHE STRING "Monero project source directory")
...
-include_directories(src/)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/src/)
...
-set(EXTERNAL_LIBS_DIR ${CMAKE_SOURCE_DIR}/external-libs)
+set(EXTERNAL_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/external-libs)
With the help of ${CMAKE_CURRENT_LIST_DIR}
I simply indicate that I want to build the rest of the paths relative to the current position of the file in the system. If this is not done, then add_subdirectory
will not work correctly.
I also change the building of the dynamic library to a static one. I think this should not break anything, because all other libraries are imported from monero-project
as static
and the monero-cpp
library itself can also be static
.
- add_library(monero-cpp SHARED ${LIBRARY_SRC_FILES})
+ add_library(monero-cpp STATIC ${LIBRARY_SRC_FILES})
Okay now we are ready to assemble. I use a customized QtCreator for building, which pulls the MSYS2 MinGW64 environment (which can be taken in monero-test/env/msys64/mingw64/paths.txt
). Or you can do it through the MSYS2 MinGW64 terminal:
mkdir .build
cd ./.build
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target all
And now I'm getting an error that I can't do anything about and don't understand why it's happening at all:
[27/28] Linking CXX executable monero-test.exe
FAILED: monero-test.exe
cmd.exe /C "cd . && C:\msys64\mingw64\bin\c++.exe -g @CMakeFiles\monero-test.rsp -o monero-test.exe -Wl,--out-implib,libmonero-test.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ."
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/monero-test/external/monero-cpp/external/monero-project/build/release/src/device_tr
ezor/libdevice_trezor.a(protocol.cpp.obj):protocol.cpp:(.text+0x43cb): undefined reference to `hmac_keccak_hash'
collect2.exe: error: ld returned 1 exit status
[28/28] Linking CXX executable external\monero-cpp\scratchpad.exe
ninja: build stopped: subcommand failed.
In fact, I simply copied the contents of monero-test/external/monero-cpp/test/sample_code.cpp
into my main.cpp
file. And it is worth noting that sample_code.cpp
itself compiles without problems.
And also it is worth noting the problem with inclusions. In my main.cpp, I need to add the following includes at the very beginning:
#include <boost/asio.hpp>
#include <windows.h>
This is some kind of well-known problem. If this is not done, then we get a million errors. And what is again strange in sample_code.cpp
there is no such problem. This issue is pulled from #include "wallet/monero_wallet_full.h"
.
Interestingly, if in monero-test/external/monero-cpp/CMakeLists.txt
one or only one monero-cpp
static lib is linked to the sample_code
target, then sample_code
compilation will end with the same error: undefined reference to hmac_keccak_hash
.
In my opinion, this is very strange behavior. I can't explain it. In essence, the monero-cpp
and sample_code
targets contain the same set of static libraries in target_link_libraries
, with only one difference, an additional unbound
is linked to the monero-cpp
target, which can also be removed and nothing bad will happen. That is, if in target_link_libraries
for the monero-cpp
target, register all the static libraries that are in the target_link_libraries
for the sample_code
target, and link the monero-cpp
static library through target_link_libraries
to the sample_code
target, then this breaks compilation. If, instead, the entire list of static libraries is directly linked to the target sample_code
(as is done now), then this does not break anything.
Compilation error with the new lib boost 1.74
monero_wallet_model.cpp:1140:120: error: call of overloaded ‘addJsonMember(const char [9], const monero::monero_tx_priority&, rapidjson::GenericDocument<rapidjson::UTF8<> >::AllocatorType&, rapidjson::Value&, rapidjson::Value&)’ is ambiguous
1140 | if (m_priority != boost::none) monero_utils::addJsonMember("priority", m_priority.get(), allocator, root, value_num);
Trying to compile this by following the readme.
I'm getting this error when I run bin/build_libmonero_cpp.sh
. I'm not that great at C++, I suppose I'm missing some dependency?
[ 3%] Building CXX object CMakeFiles/scratchpad.dir/src/wallet/monero_wallet_keys.cpp.o
In file included from /home/user/git/monero-java/external/monero-cpp-library/src/wallet/monero_wallet_keys.h:55,
from /home/user/git/monero-java/external/monero-cpp-library/src/wallet/monero_wallet_keys.cpp:53:
/home/user/git/monero-java/external/monero-cpp-library/src/wallet/monero_wallet.h:397:13: error: ‘set’ does not name a type
397 | virtual set<monero_wallet_listener*> get_listeners() {
| ^~~
make[2]: *** [CMakeFiles/scratchpad.dir/build.make:161: CMakeFiles/scratchpad.dir/src/wallet/monero_wallet_keys.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/scratchpad.dir/all] Error 2
make: *** [Makefile:104: all] Error 2
I tried compiling in two ways:
Both give the same problem.
This is what ./external-libs/ looks like:
.
├── boost
│ ├── libboost_atomic.a
│ ├── libboost_chrono.a
│ ├── libboost_container.a
│ ├── libboost_context.a
│ ├── libboost_contract.a
│ ├── libboost_coroutine.a
│ ├── libboost_date_time.a
│ ├── libboost_exception.a
│ ├── libboost_fiber.a
│ ├── libboost_filesystem.a
│ ├── libboost_graph.a
│ ├── libboost_iostreams.a
│ ├── libboost_locale.a
│ ├── libboost_log.a
│ ├── libboost_log_setup.a
│ ├── libboost_math_c99.a
│ ├── libboost_math_c99f.a
│ ├── libboost_math_c99l.a
│ ├── libboost_math_tr1.a
│ ├── libboost_math_tr1f.a
│ ├── libboost_math_tr1l.a
│ ├── libboost_numpy38.a
│ ├── libboost_prg_exec_monitor.a
│ ├── libboost_program_options.a
│ ├── libboost_python38.a
│ ├── libboost_random.a
│ ├── libboost_regex.a
│ ├── libboost_serialization.a
│ ├── libboost_stacktrace_addr2line.a
│ ├── libboost_stacktrace_basic.a
│ ├── libboost_stacktrace_noop.a
│ ├── libboost_system.a
│ ├── libboost_test_exec_monitor.a
│ ├── libboost_thread.a
│ ├── libboost_timer.a
│ ├── libboost_type_erasure.a
│ ├── libboost_unit_test_framework.a
│ ├── libboost_wave.a
│ └── libboost_wserialization.a
├── hidapi
│ └── libhidapi-libusb.a
├── libsodium
│ └── libsodium.a
└── openssl
├── libcrypto.a
└── libssl.a
libwallet.a and libwallet_merged.a are in ./external/monero-core/build/release/lib
That will through a native exception when I create a tx and set a priority.
I will get the abort message like below
terminating with uncaught exception of type boost::wrapexceptboost::property_tree::ptree_bad_data: conversion of data to type "j" failed
How could I fix it?
monero_wallet_full::create_wallet_from_keys
is depreciated, yet creating a view-only wallet through the recommended monero_wallet_full::create_wallet
will fail to initialize (perhaps because it checks for m_private_spend_key
instead of m_private_view_key
?)
This issue requests help automating the build of this project.
For comparison, Cake Wallet's automated build process is documented here: https://github.com/fotolockr/CakeWallet
And Monerujo's build process is documented here: https://github.com/m2049r/xmrwallet/blob/master/doc/BUILDING-external-libs.md
Ideally this project would contain a shell script to be executed one time which downloads and builds all dependencies, but any contributions that get closer to that are welcome.
This code, which is now deprecated works perfectly fine:
monero_wallet_obj = std::unique_ptr<monero_wallet_full>(monero_wallet_full::create_wallet_from_mnemonic("", "", network_type, mnemonic));
But I'm having an issue after transitioning to the new monero_wallet_full::create_wallet()
function that uses monero::monero_wallet_config
monero::monero_wallet_config wallet_config_obj;
wallet_config_obj.m_path = "";
wallet_config_obj.m_password = "";
wallet_config_obj.m_network_type = network_type;
wallet_config_obj.m_mnemonic = mnemonic;
monero_wallet_obj = std::unique_ptr<monero_wallet_full>(monero_wallet_full::create_wallet (wallet_config_obj, nullptr));
The second code snippet above produces this error:
/usr/include/boost/optional/optional.hpp:1211: boost::optional<T>::reference_const_type boost::optional<T>::get() const [with T = long unsigned int; boost::optional<T>::reference_const_type = const long unsigned int&]: Assertion `this->is_initialized()' failed.
Aborted (core dumped)
Could I be doing something wrong here?
The README states this work is licensed under the MIT license. Please add the actual license in a dedicated LICENSE file, to avoid possible future issues.
使用MSYS2构建出现以下错误,我该如何解决他
[ 37%] Building CXX object src/common/CMakeFiles/obj_common.dir/dns_utils.cpp.obj
In file included from D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.c
pp:35:
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/threadpool.h:92:10: error: 'deque
' in namespace 'std' does not name a template type
92 | std::deque queue;
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/threadpool.h:33:1: note: 'std::de
que' is defined in header ''; did you forget to '#include '?
32 | #include <boost/thread/thread.hpp>
+++ |+#include
33 | #include
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp: In function 'bool
tools::dns_utils::load_txt_records_from_dns(std::vector<std::__cxx11::basic_string >&, const s
td::vector<std::__cxx11::basic_string >&)':
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:20: error: 'set
' is not a member of 'std'
517 | std::vector<std::setstd::string > records;
| ^~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:39:1: note: 'std::s
et' is defined in header ''; did you forget to '#include '?
38 | #include <boost/algorithm/string/join.hpp>
+++ |+#include
39 | #include <boost/optional.hpp>
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:20: error: 'set
' is not a member of 'std'
517 | std::vector<std::setstd::string > records;
| ^~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:20: note: 'std:
:set' is defined in header ''; did you forget to '#include '?
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:35: error: temp
late argument 1 is invalid
517 | std::vector<std::setstd::string > records;
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:35: error: temp
late argument 2 is invalid
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:517:37: error: expe
cted unqualified-id before '>' token
517 | std::vector<std::setstd::string > records;
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:518:3: error: 'reco
rds' was not declared in this scope
518 | records.resize(dns_urls.size());
| ^~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:523:8: error: 'dequ
e' is not a member of 'std'
523 | std::deque avail(dns_urls.size(), false), valid(dns_urls.size(), false);
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:39:1: note: 'std::d
eque' is defined in header ''; did you forget to '#include '?
38 | #include <boost/algorithm/string/join.hpp>
+++ |+#include
39 | #include <boost/optional.hpp>
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:523:14: error: expe
cted primary-expression before 'bool'
523 | std::deque avail(dns_urls.size(), false), valid(dns_urls.size(), false);
| ^~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:51: error: 'ava
il' was not declared in this scope
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:59: error: 'val
id' was not declared in this scope
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp: In lambda function
:
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:529:84: error: 'ava
il' is not captured
529 | const auto res = tools::DNSResolver::instance().get_txt_record(dns_urls[n], avail[n],
valid[n]);
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:64: note: the l
ambda has no capture-default
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:51: note: 'avail' declared here
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:529:94: error: 'val
id' is not captured
529 | const auto res = tools::DNSResolver::instance().get_txt_record(dns_urls[n], avail[n],
valid[n]);
|
^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:64: note: the l
ambda has no capture-default
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:59: note: 'valid' declared here
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:531:10: error: 'rec
ords' is not captured
531 | records[n].insert(s);
| ^~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:528:64: note: the l
ambda has no capture-default
528 | tpool.submit(&waiter,n, dns_urls, &records, &avail, &valid{
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:518:3: note: 'records' declared here
518 | records.resize(dns_urls.size());
| ^~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp: In function 'bool
tools::dns_utils::load_txt_records_from_dns(std::vector<std::__cxx11::basic_string >&, const s
td::vector<std::__cxx11::basic_string >&)':
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:540:10: error: 'ava
il' was not declared in this scope
540 | if (!avail[cur_index])
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:545:10: error: 'val
id' was not declared in this scope
545 | if (!valid[cur_index])
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:25: error: 'set
' is not a member of 'std'
574 | typedef std::map<std::setstd::string, uint32_t> map_t;
| ^~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:25: note: 'std:
:set' is defined in header ''; did you forget to '#include '?
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:25: error: 'set
' is not a member of 'std'
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:25: note: 'std:
:set' is defined in header ''; did you forget to '#include '?
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:40: error: wron
g number of template arguments (1, should be at least 2)
574 | typedef std::map<std::setstd::string, uint32_t> map_t;
| ^
In file included from D:/msys2/mingw64/include/c++/12.2.0/map:61,
from D:/msys2/home/yangys/monero-cpp/external/monero-project/external/easylogging++
/easylogging++.h:405,
from D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/m
isc_log_ex.h:35,
from D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/i
nclude_base_utils.h:32,
from D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.c
pp:34:
D:/msys2/mingw64/include/c++/12.2.0/bits/stl_map.h:100:11: note: provided for 'template<class _Key,
class Tp, class Compare, class Alloc> class std::map'
100 | class map
| ^~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:41: error: expe
cted unqualified-id before ',' token
574 | typedef std::map<std::setstd::string, uint32_t> map_t;
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:574:51: error: expe
cted initializer before '>' token
574 | typedef std::map<std::setstd::string, uint32_t> map_t;
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:575:3: error: 'map
t' was not declared in this scope
575 | map_t record_count;
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:579:9: error: 'reco
rd_count' was not declared in this scope
579 | ++record_count[e];
| ^~~~~~~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:582:3: error: 'map
t' is not a class, namespace, or enumeration
582 | map_t::const_iterator good_record = record_count.end();
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:583:8: error: 'map
t' is not a class, namespace, or enumeration
583 | for (map_t::const_iterator i = record_count.begin(); i != record_count.end(); ++i)
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:583:56: error: 'i'
was not declared in this scope
583 | for (map_t::const_iterator i = record_count.begin(); i != record_count.end(); ++i)
| ^
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:583:61: error: 'rec
ord_count' was not declared in this scope
583 | for (map_t::const_iterator i = record_count.begin(); i != record_count.end(); ++i)
| ^~~~~~~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:585:9: error: 'good
_record' was not declared in this scope; did you mean 'good_records'?
585 | if (good_record == record_count.end() || i->second > good_record->second)
| ^~~~~~~~~~~
| good_records
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:589:23: error: 'goo
d_record' was not declared in this scope; did you mean 'good_records'?
589 | MDEBUG("Found " << (good_record == record_count.end() ? 0 : good_record->second) << "/" <<
dns_urls.size() << " matching records from " << num_valid_records << " valid records");
| ^~~~~~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:45:93: no
te: in definition of macro 'MCLOG_TYPE'
45 | el::base::Writer(level, color, FILE, LINE, ELPP_FUNC, type).construct(cat) <<
x;
|
^
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:56:24: no
te: in expansion of macro 'MCLOG'
56 | #define MCDEBUG(cat,x) MCLOG(el::Level::Debug,cat, el::Color::Default, x)
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:78:19: no
te: in expansion of macro 'MCDEBUG'
78 | #define MDEBUG(x) MCDEBUG(MONERO_DEFAULT_LOG_CATEGORY,x)
| ^~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:589:3: note: in exp
ansion of macro 'MDEBUG'
589 | MDEBUG("Found " << (good_record == record_count.end() ? 0 : good_record->second) << "/" <<
dns_urls.size() << " matching records from " << num_valid_records << " valid records");
| ^~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:589:38: error: 'rec
ord_count' was not declared in this scope
589 | MDEBUG("Found " << (good_record == record_count.end() ? 0 : good_record->second) << "/" <<
dns_urls.size() << " matching records from " << num_valid_records << " valid records");
| ^~~~~~~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:45:93: no
te: in definition of macro 'MCLOG_TYPE'
45 | el::base::Writer(level, color, FILE, LINE, ELPP_FUNC, type).construct(cat) <<
x;
|
^
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:56:24: no
te: in expansion of macro 'MCLOG'
56 | #define MCDEBUG(cat,x) MCLOG(el::Level::Debug,cat, el::Color::Default, x)
| ^~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/contrib/epee/include/misc_log_ex.h:78:19: no
te: in expansion of macro 'MCDEBUG'
78 | #define MDEBUG(x) MCDEBUG(MONERO_DEFAULT_LOG_CATEGORY,x)
| ^~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:589:3: note: in exp
ansion of macro 'MDEBUG'
589 | MDEBUG("Found " << (good_record == record_count.end() ? 0 : good_record->second) << "/" <<
dns_urls.size() << " matching records from " << num_valid_records << " valid records");
| ^~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:590:7: error: 'good
_record' was not declared in this scope; did you mean 'good_records'?
590 | if (good_record == record_count.end() || good_record->second < dns_urls.size() / 2 + 1)
| ^~~~~~~~~~~
| good_records
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:590:22: error: 'rec
ord_count' was not declared in this scope
590 | if (good_record == record_count.end() || good_record->second < dns_urls.size() / 2 + 1)
| ^~~~~~~~~~~~
D:/msys2/home/yangys/monero-cpp/external/monero-project/src/common/dns_utils.cpp:597:23: error: 'goo
d_record' was not declared in this scope; did you mean 'good_records'?
597 | for (const auto &s: good_record->first)
| ^~~~~~~~~~~
| good_records
make[3]: *** [src/common/CMakeFiles/obj_common.dir/build.make:104: src/common/CMakeFiles/obj_common.dir/dns_utils.cpp.obj] Error 1
make[2]: *** [CMakeFiles/Makefile2:1596: src/common/CMakeFiles/obj_common.dir/all] Error 2
make[1]: *** [Makefile:146: all] Error 2
make[1]: Leaving directory '/home/yangys/monero-cpp/external/monero-project/build/release'
make: *** [Makefile:155: release-static-win64] Error 2
Hi there,
I am struggling to build the library on my Apple M1 (I managed to build on Linux, Apple Intel, and using buildx of docker). I had to make some tweaks to build monero statically (tip from monero-project/monero#8332) but, I can't find why the library libwallet-crypto.a
wasn't built by monero.
Tried to upload the monero compilation logs somewhere but it was too big. Let me know if you need an specific part of it.
monero-cpp compilation:
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- EXTERNAL_LIBS_DIR:/Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/external-libs
-- EXTRA_LIBRARIES:/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework
-- Found Protobuf: /opt/homebrew/lib/libprotobuf.dylib (found version "3.21.2")
-- Protobuf lib: /opt/homebrew/lib/libprotobuf.dylib, inc: /opt/homebrew/include, protoc: /opt/homebrew/bin/protoc
-- Using Boost include dir at /opt/homebrew/include
-- Using OpenSSL found at /opt/homebrew/opt/openssl@3
-- Found OpenSSL: /opt/homebrew/opt/openssl@3/lib/libcrypto.dylib (found version "3.0.5")
-- Using OpenSSL include dir at /opt/homebrew/opt/openssl@3/include
-- Using libsodium library at /opt/homebrew/lib/libsodium.dylib
-- Found HIDAPI: /opt/homebrew/lib/libhidapi.dylib
-- Using HIDAPI include dir at /opt/homebrew/include/hidapi
-- Using monero-project build:/Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/external/monero-project/build/release
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/build
[ 12%] Building CXX object CMakeFiles/monero-cpp.dir/src/utils/gen_utils.cpp.o
[ 25%] Building CXX object CMakeFiles/monero-cpp.dir/src/utils/monero_utils.cpp.o
[ 37%] Building CXX object CMakeFiles/monero-cpp.dir/src/daemon/monero_daemon_model.cpp.o
[ 50%] Building CXX object CMakeFiles/monero-cpp.dir/src/daemon/monero_daemon.cpp.o
[ 62%] Building CXX object CMakeFiles/monero-cpp.dir/src/wallet/monero_wallet_model.cpp.o
[ 75%] Building CXX object CMakeFiles/monero-cpp.dir/src/wallet/monero_wallet_keys.cpp.o
[ 87%] Building CXX object CMakeFiles/monero-cpp.dir/src/wallet/monero_wallet_full.cpp.o
In file included from /Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/src/wallet/monero_wallet_full.cpp:60:
/Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/external/monero-project/src/wallet/wallet_rpc_server_commands_defs.h:51:9: warning: 'WALLET_RPC_VERSION_MINOR' macro redefined [-Wmacro-redefined]
#define WALLET_RPC_VERSION_MINOR 24
^
/Users/aquila.freitas/Projects/Personal/Monero/monero-cpp/external/monero-project/src/wallet/wallet_rpc_server_commands_defs.h:50:9: note: previous definition is here
#define WALLET_RPC_VERSION_MINOR 22
^
1 warning generated.
gmake[2]: *** No rule to make target '../external/monero-project/build/release/src/crypto/wallet/libwallet-crypto.a', needed by 'libmonero-cpp.dylib'. Stop.
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/monero-cpp.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
I modified 'cd $MONERO_CPP/external/monero-project && make release-static -j8 && make release-static -j8' of operation 5 to 'cd $MONERO_CPP/external/monero-project && make release-static-win64 - j8 && make release-static-win64 -j8'.
Execute operation 6 to the following exception.
[ 98%] Linking CXX executable ../../bin/monero-gen-trusted-multisig.exe
[ 98%] Linking CXX executable ../../bin/monero-blockchain-mark-spent-outputs.exe
make[3]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
[ 98%] Built target blockchain_blackball
make[3]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
[ 98%] Built target gen_multisig
[ 98%] Linking CXX executable ../../bin/monero-wallet-cli.exe
make[3]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
[ 98%] Built target simplewallet
[100%] Linking CXX executable ../../bin/monero-wallet-rpc.exe
make[3]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
[100%] Built target wallet_rpc_server
make[2]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
make[1]: Leaving directory '/monero-java/external/monero-cpp/external/monero-project/build/release'
-- Building for: Ninja
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/software/msys2/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/software/msys2/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- EXTERNAL_LIBS_DIR:D:/software/msys2/monero-java/external/monero-cpp/external-libs
-- EXTRA_LIBRARIES:setupapi
Protobuf_INCLUDE_DIR------------->>>D:/software/msys2/mingw64/include/protobuf-3.21.2
-- Found Protobuf: usr/bin/ (found version "3.21.2")
Protobuf_INCLUDE_DIR------------->>>D:/software/msys2/mingw64/include/protobuf-3.21.2
-- Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR) (found version "3.21.2")
-- Protobuf lib: usr/bin/, inc: , protoc: D:/software/protoc/bin/protoc.exe
-- Using Boost include dir at D:/software/msys2/mingw64/include
-- Found OpenSSL: D:/software/msys2/mingw64/lib/libcrypto.dll.a (found version "1.1.1q")
-- Using OpenSSL include dir at D:/software/msys2/mingw64/include
-- Using libsodium library at D:/software/msys2/mingw64/lib/libsodium.dll.a
-- Found HIDAPI: D:/software/msys2/mingw64/lib/libhidapi.dll.a
-- Using HIDAPI include dir at D:/software/msys2/mingw64/include/hidapi
-- Using monero-project build:D:/software/msys2/monero-java/external/monero-cpp/external/monero-project/build/release
-- Configuring done
-- Generating done
-- Build files have been written to: D:/software/msys2/monero-java/external/monero-cpp/build
ninja: error: '../external/monero-project/build/release/src/crypto/wallet/libwallet-crypto.a', needed by 'libmonero-cpp.dll', missing and no known rule to make it
This issue requests a RPC and/or REST wallet server be built based on this library's API.
For example, GET /get_txs
with a MoneroTxQuery
payload returns List<MoneroTxWallet>
rooted at their blocks in order to remove redundancy.
The server should be a light layer on top of this library's existing wallet implementation and implemented based on Monero Core's existing wallet_rpc_server.cpp for maximum compatibility.
After running make release-static
on the monero project, I ran ./bin/build_libmonero_cpp.sh
to build the shared libraries. This resulted in the following output:
output.txt
An issue that I'm dealing with has been fixed in later commits.
This issue tests the bounty system.
I'm having trouble compiling monero-project in Ubuntu (both 20.04 and 22.04) due to some undefined reference errors:
[ 95%] Linking CXX executable ../../bin/monerod
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libzmq.a(libzmq_la-ws_engine.o): in function `zmq::ws_engine_t::server_handshake()':
(.text+0x1a6b): undefined reference to `strlcpy'
/usr/bin/ld: (.text+0x1ab9): undefined reference to `strlcpy'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libzmq.a(libzmq_la-ws_engine.o): in function `zmq::ws_engine_t::client_handshake()':
(.text+0x24a5): undefined reference to `strlcpy'
/usr/bin/ld: (.text+0x24cc): undefined reference to `strlcpy'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnorm.a(normApi.cpp.o): in function `NormInstance::SetCacheDirectory(char const*)':
(.text+0xe0): undefined reference to `ProtoDispatcher::SuspendThread()'
/usr/bin/ld: (.text+0x153): undefined reference to `ProtoDispatcher::ResumeThread()'
...
Am I missing anything and is there anyway to resolve this issue?
Compiling on Ubuntu-20:
Section: Using this library in your project
From the description:
Link to this library's source files in your application or build as a shared library in ./build/: $ cd $MONERO_CPP && ./bin/build_libmonero_cpp.sh
Gives the following error:
[ 95%] Built target simplewallet
[ 95%] Built target blockchain_blackball
[ 96%] Built target gen_multisig
[ 97%] Built target wallet_rpc_server
-- EXTERNAL_LIBS_DIR:/home/mike/code/wrappers/monero-cpp/external-libs
-- EXTRA_LIBRARIES:
-- Protobuf lib: /usr/lib/x86_64-linux-gnu/libprotobuf.so, inc: /usr/include, protoc: /usr/bin/protoc
-- Using Boost include dir at /usr/include
-- Using OpenSSL include dir at /usr/include
-- Using libsodium library at /usr/lib/x86_64-linux-gnu/libsodium.so
-- Using HIDAPI include dir at /usr/include/hidapi
-- Using monero-project build:/home/mike/code/wrappers/monero-cpp/external/monero-project/build/release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mike/code/wrappers/monero-cpp/build
make[2]: *** No rule to make target '../external/monero-project/build/release/lib/libwallet_merged.a', needed by 'scratchpad'. Stop.
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/scratchpad.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I expected it to compile by default.
Last step cd ../../ && ./bin/build_libmonero_cpp.sh
failed with error
[2/8] Building CXX object CMakeFiles/monero-cpp.dir/src/utils/gen_utils.cpp.obj
FAILED: CMakeFiles/monero-cpp.dir/src/utils/gen_utils.cpp.obj
C:\msys64\mingw64\bin\c++.exe -DHAVE_HIDAPI -DWIN32_LEAN_AND_MEAN -D_GLIBCXX_USE_NANOSLEEP=1 -Dmoner
o_cpp_EXPORTS -IC:/msys64/home/HP/monero-java/external/monero-cpp/src -IC:/msys64/home/HP/monero-jav
a/external/monero-cpp/external/monero-project/contrib/epee/include -IC:/msys64/home/HP/monero-java/e
xternal/monero-cpp/external/monero-project/external -IC:/msys64/home/HP/monero-java/external/monero-
cpp/external/monero-project/external/easylogging++ -IC:/msys64/home/HP/monero-java/external/monero-c
pp/external/monero-project/external/rapidjson/include -IC:/msys64/home/HP/monero-java/external/moner
o-cpp/external/monero-project/src -IC:/msys64/home/HP/monero-java/external/monero-cpp/external/moner
o-project/src/wallet -IC:/msys64/home/HP/monero-java/external/monero-cpp/external/monero-project/src
/wallet/api -IC:/msys64/home/HP/monero-java/external/monero-cpp/external/monero-project/src/hardfork
s -IC:/msys64/home/HP/monero-java/external/monero-cpp/external/monero-project/src/crypto/crypto_ops_
builder/include -IC:/msys64/home/HP/monero-java/external/monero-cpp/external/libsodium/include/sodiu
m -IC:/msys64/mingw64/include/hidapi -Wa,-mbig-obj -O2 -fPIC -std=c++14 -F/Library/Frameworks -pthre
ad -lcrypto -lcrypt32 -MD -MT CMakeFiles/monero-cpp.dir/src/utils/gen_utils.cpp.obj -MF CMakeFiles\m
onero-cpp.dir\src\utils\gen_utils.cpp.obj.d -o CMakeFiles/monero-cpp.dir/src/utils/gen_utils.cpp.obj
-c C:/msys64/home/HP/monero-java/external/monero-cpp/src/utils/gen_utils.cpp
In file included from C:/msys64/home/HP/monero-java/external/monero-cpp/src/utils/gen_utils.cpp:53:
C:/msys64/home/HP/monero-java/external/monero-cpp/src/utils/gen_utils.h: In function 'void gen_utils
::wait_for(uint64_t)':
C:/msys64/home/HP/monero-java/external/monero-cpp/src/utils/gen_utils.h:88:10: error: 'std::this_thr
ead' has not been declared
88 | std::this_thread::sleep_for(std::chrono::milliseconds(duration_ms));
| ^~~~~~~~~~~
This feature requests supporting an implementation of monero_wallet.h which shares the view key with a 3rd party in order to scan the blockchain for incoming transfers.
A specialization of this could be an adapter for the MyMonero API.
This issue requests building and testing this library on Windows
Currently monero-cpp depends on wallet_merged in monero-project.
However, wallet_merged is removed from monero-project in master with this PR: monero-project/monero#7694
This issue requests removing the dependency on wallet_merged and using wallet_api instead, similar to the GUI: monero-project/monero-gui#3448
I am experiencing some difficulties with compiling this library for my project, which also compiles under Windows.
As I understand it, under Windows i can only compile using MSYS2 and MINGW compiler, which is bad for me. MSVC and MINGW can at least have different ABIs and the static library files themselves have different extensions.
I had an idea to compile the project with the MSVC compiler, but I ran into a problem. I was unable to compile the "libunbound" library. I think "libunbound" is basically not designed to be compiled through MSVC.
Is there any way I can compile the project and at least get the *.lib static libraries so I can use "monero-cpp" in my project?
Hi Woodser, I'm new to c++ and want to try the monero library, the build is successful i believe (no errors), I followed all the steps, but I have never used a library (outside the standard library) and have no clue what to put after g++ in the command line.
In Home/monero-cpp/test there is the file sample_code.cpp that i want to run. In step 7 you say "Link to this library's source files in your application", Do you mean the source files in Home/monero-cpp/src, and what does linking mean in this context do i have to somehow tell the compiler the path to these files, and how will my program use the monero-project functions, how should i tell the compiler to check wallet2.cpp and all the other files.
You also say "build as a shared library in ./build/", running the shell script build_libmonero_cpp.sh just creates in Home/monero-cpp/external/monero-project/build what is already in the release folder. So is the step necessary ?
Finally, the closest thing to a library that I could comprehend is the static library libwallet.a in .../monero-project/build/lib (static libraries are not shared libraries ?), and the other .a files in build/src folders. But I can't find shared library file ending with .so and i find no trace of the libwallet_merged.a file that you describe in step 5.
And even if i found the right .so file, i couldn't tell how to link it with the a basic test program. I've read ressources about static and dynamic linking but still can't figure out anything. So please if you could give me some help and direction please. (I'm on Ubuntu)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.