diff --git a/lib/Makefile b/lib/Makefile index 7dec57c..9eef9b1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -6,12 +6,14 @@ else CFLAGS := "" endif +PWD := $(shell pwd) + all: release winrelease: target/x86_64-pc-windows-gnu/release/zecwalletlite.lib target/x86_64-pc-windows-gnu/release/zecwalletlite.lib: src/lib.rs Cargo.toml - cargo build --lib --release --target x86_64-pc-windows-gnu + SODIUM_LIB_DIR="$(PWD)/libsodium-mingw/" cargo build --lib --release --target x86_64-pc-windows-gnu release: target/release/zecwalletlite.$(EXT) debug: target/debug/zecwalletlite.$(EXT) diff --git a/lib/libsodium-mingw/libsodium.a b/lib/libsodium-mingw/libsodium.a new file mode 100644 index 0000000..363c743 Binary files /dev/null and b/lib/libsodium-mingw/libsodium.a differ diff --git a/src/camount.h b/src/camount.h index 1f45418..6487720 100644 --- a/src/camount.h +++ b/src/camount.h @@ -1,6 +1,7 @@ #ifndef CAMOUNT_H #define CAMOUNT_H +#include "precompiled.h" class CAmount { private: diff --git a/src/connection.cpp b/src/connection.cpp index 9354dd4..585a0be 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -65,6 +65,7 @@ void ConnectionLoader::doAutoConnect() { } auto connection = makeConnection(config); + auto me = this; // After the lib is initialized, try to do get info connection->doRPC("info", "", [=](auto) { @@ -95,7 +96,7 @@ void ConnectionLoader::doAutoConnect() { if (isSyncing != nullptr && reply.find("synced_blocks") != reply.end()) { qint64 synced = reply["synced_blocks"].get(); qint64 total = reply["total_blocks"].get(); - showInformation("Synced " + QString::number(synced) + " / " + QString::number(total)); + me->showInformation("Synced " + QString::number(synced) + " / " + QString::number(total)); } }, [=](QString err) {