-2

OS : Windows 10

Installed Dependencies:

  • -qt4.8.6
  • gcc 6.3.0
  • boost 1_55_0
  • berkeleyDB 4.8.30NC
  • openssl 1.0.2l

I tried compiling with the following commands:

qmake "USE_UPNP=1" coin-pt.pro
mingw32-make -f Makefile.Release

That resulted in this error:

./build\leveldb.o:leveldb.cpp:(.text+0x664): undefined reference to leveldb::DB::Open(leveldb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, leveldb::DB**)'
./build\leveldb.o:leveldb.cpp:(.text+0x72b): undefined reference toleveldb::DestroyDB(std::__cxx11::basic_string, std::allocator > const&, leveldb::Options const&)' ./build\leveldb.o:leveldb.cpp:(.text+0x826): undefined reference to leveldb::Status::ToString[abi:cxx11]() const'
./build\leveldb.o:leveldb.cpp:(.text+0x9b3): undefined reference toleveldb::Status::ToStringabi:cxx11 const' ./build\txdb.o:txdb.cpp:(.text+0x39b): undefined reference to leveldb::Status::ToString[abi:cxx11]() const'
./build\txdb.o:txdb.cpp:(.text+0xcc5): undefined reference toleveldb::Status::ToStringabi:cxx11 const' ./build\txdb.o:txdb.cpp:(.text+0xeb4): undefined reference to leveldb::Status::ToString[abi:cxx11]() const'
./build\txdb.o:txdb.cpp:(.text+0x1520): more undefined references toleveldb::Status::ToStringabi:cxx11 const' follow collect2.exe: error: ld returned 1 exit status Makefile.Release:287: recipe for target 'release\Coin-qt.exe' failed mingw32-make: *** [release\Coin-qt.exe] Error 1

How do I fix this problem?


It is the result after the qmake command. It is part of the Makefile.Release file

LIBS = -L"c:\Qt\4.8.6\lib" build\bitcoin-qt_res.o -lshlwapi -lpthread -lssl -lcrypto -ldb_cxx -lws2_32 -lole32 -loleaut32 -luuid -lgdi32 -lboost_system-mgw63-mt-1_55 -lboost_filesystem-mgw63-mt-1_55 -lboost_program_options-mgw63-mt-1_55 -lboost_thread-mgw63-mt-1_55 -LC:/deps/miniupnpc -lminiupnpc -liphlpapi  C:/toscoin-src/src/leveldb/libleveldb.a C:/toscoin-src/src/leveldb/libmemenv.a -lshlwapi -LC:/deps/boost_1_55_0/stage/lib -Lc:/deps/db-5.3.28.NC/build_unix -Lc:/deps/openssl-1.0.2l -LC:/deps/qrencode-3.4.4/.libs -lssl -lcrypto -ldb_cxx -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -lboost_system-mgw63-mt-1_55 -lboost_filesystem-mgw63-mt-1_55 -lboost_program_options-mgw63-mt-1_55 -lboost_thread-mgw63-mt-1_55 -lboost_chrono-mgw63-mt-1_55 -lQtGui4 -lQtNetwork4 -lQtCore4 -lpthread C:/toscoin-src/src/leveldb/libleveldb.a C:/toscoin-src/src/leveldb/libmemenv.a

1 Answer 1

0

You did not compile LevelDB. In your altcoin's source code, you should see a folder for leveldb. cd into that directory and build leveldb. There should be instructions for that in the leveldb folder.

16
  • Thank you for your advice. but I did compile LevelDB because i have LevelDB source in altcoin`s source folder
    – southouse
    Commented Oct 20, 2017 at 3:32
  • Just because the source is there does not mean that it was compiled. The makefile that you built with does not necessarily include instructions to build that code. IIRC, many altcoins are like this in that the leveldb stuff must be built separately as it uses separate makefiles.
    – Ava Chow
    Commented Oct 20, 2017 at 3:36
  • if so recompiling to LevelDB?
    – southouse
    Commented Oct 20, 2017 at 3:41
  • Your last comment does not make sense. You need to build leveldb and put the resulting files (should be .a files in the right place so that they can be linked when you build the rest of your altcoin source code.
    – Ava Chow
    Commented Oct 20, 2017 at 3:43
  • How do I know that compilation was not successful?
    – southouse
    Commented Oct 20, 2017 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.