aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-07-13 15:26:31 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-07-18 23:03:09 +0300
commit193d2513607edf316e283a7360501e1d1feab2a0 (patch)
treed3f0ffe8ddd7b573b361fdee3466aa2df15fc330 /src/wallet
parentwallet_api: segfault on refresh fixed (diff)
downloadmonero-193d2513607edf316e283a7360501e1d1feab2a0.tar.xz
libwallet_api cmake: conditionally creating libwallet_merged2 only for
STATIC build
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/CMakeLists.txt23
-rw-r--r--src/wallet/api/wallet.cpp3
2 files changed, 17 insertions, 9 deletions
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
index 7ed1004e2..086758c39 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -75,17 +75,26 @@ target_link_libraries(wallet
${Boost_REGEX_LIBRARY}
${EXTRA_LIBRARIES})
+
+# in case of static build, randon.c.obj from UNBOUND_LIBARY conflicts with the same file from 'crypto'
+# and in case of dynamic build, merge_static_libs called with ${UNBOUND_LIBRARY} will fail
+if (STATIC)
+ set(libs_to_merge wallet cryptonote_core mnemonics common crypto)
+ # hack - repack libunbound into another static lib - there's conflicting object file "random.c.obj"
+ merge_static_libs(wallet_merged "${libs_to_merge}")
+ merge_static_libs(wallet_merged2 "${UNBOUND_LIBRARY}")
+ install(TARGETS wallet_merged wallet_merged2
+ ARCHIVE DESTINATION lib)
+else (STATIC)
+ set(libs_to_merge wallet cryptonote_core mnemonics common crypto ${UNBOUND_LIBRARY} )
+ merge_static_libs(wallet_merged "${libs_to_merge}")
+ install(TARGETS wallet_merged
+ ARCHIVE DESTINATION lib)
+endif (STATIC)
-# set(libs_to_merge wallet cryptonote_core mnemonics common crypto ${UNBOUND_LIBRARY} )
-set(libs_to_merge wallet cryptonote_core mnemonics common crypto)
#MERGE_STATIC_LIBS(wallet_merged wallet_merged "${libs_to_merge}")
-merge_static_libs(wallet_merged "${libs_to_merge}")
-# hack - repack libunbound into another static lib - there's conflicting object file "random.c.obj"
-merge_static_libs(wallet_merged2 "${UNBOUND_LIBRARY}")
-install(TARGETS wallet_merged wallet_merged2
- ARCHIVE DESTINATION lib)
install(FILES ${wallet_api_headers}
DESTINATION include/wallet)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 15cffe2af..e75f5afdb 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -371,8 +371,7 @@ bool WalletImpl::init(const std::string &daemon_address, uint64_t upper_transact
if (Utils::isAddressLocal(daemon_address)) {
this->setTrustedDaemon(true);
}
- startRefresh();
-
+ refresh();
} catch (const std::exception &e) {
LOG_ERROR("Error initializing wallet: " << e.what());
m_status = Status_Error;