Got an issue compiling After working my way through many errors compiling an alt-coin windows qt. 

Everything compiles fine right until the final stage when the system is putting together the exe. 

You can find the error below. leveldb is installed and libleveldb.a and libmemenv.a files are correctly in src/leveldb ... Any help resolving this issue would be appreciated. 

uuid -lgdi32 -lboost_system-mgw48-mt-1_54 -lboost_filesystem-mgw48-mt-1_54 -lboo
st_program_options-mgw48-mt-1_54 -lboost_thread-mgw48-mt-1_54 -lboost_chrono-mgw
48-mt-1_54 -lQtGui4 -lQtCore4
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x433): undefined reference to `l
eveldb::DB::Open(leveldb::Options const&amp;, std::string const&amp;, leveldb::DB**)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x73f): undefined reference to `l
eveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x866): undefined reference to `l
eveldb::WriteBatch::~WriteBatch()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x89f): undefined reference to `l
eveldb::WriteBatch::WriteBatch()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x921): undefined reference to `l
eveldb::WriteBatch::~WriteBatch()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x944): undefined reference to `l
eveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0xac4): undefined reference to `l
eveldb::WriteBatch::Iterate(leveldb::WriteBatch::Handler*) const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0xaf5): undefined reference to `l
eveldb::WriteBatch::Handler::~Handler()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0xb24): undefined reference to `l
eveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x14a9): undefined reference to `
leveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x176f): undefined reference to `
leveldb::WriteBatch::Put(leveldb::Slice const&amp;, leveldb::Slice const&amp;)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x18b2): undefined reference to `
leveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x1a57): undefined reference to `
leveldb::Options::Options()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x1ae0): undefined reference to `
leveldb::Options::Options()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x1b35): undefined reference to `
leveldb::NewLRUCache(unsigned int)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x1b44): undefined reference to `
leveldb::NewBloomFilterPolicy(int)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x1b9c): undefined reference to `
leveldb::NewBloomFilterPolicy(int)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x2021): undefined reference to `
leveldb::WriteBatch::~WriteBatch()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x211d): undefined reference to `
leveldb::Status::ToString() const'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x35c3): undefined reference to `
leveldb::WriteBatch::Delete(leveldb::Slice const&amp;)'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x6488): undefined reference to `
leveldb::WriteBatch::~WriteBatch()'
./build\txdb-leveldb.o:txdb-leveldb.cpp:(.text+0x64b8): undefined reference to `
leveldb::WriteBatch::~WriteBatch()'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ./build\tx
db-leveldb.o: bad reloc address 0x2 in section `.text$_ZN5boost16exception_detai
l10clone_baseD1Ev[__ZN5boost16exception_detail10clone_baseD1Ev]'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link
 failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Check if your libleveldb.a compiled all necessary files correctly. Could you run the following commands please and post the output back?

ar tv libmemenv.a and ar tv libleveldb.a. If the output is something similar to

rw-rw-rw- 0/0 432255 Apr 15 16:56 2014 memenv.o
rw-rw-rw- 0/0  21322 Apr 15 16:56 2014 port_win.o


then the problem could be that your Windows find.exe is overruling your MSYS file.exe. They both work very differently and are not interchangeable. The makefile of LevelDB uses the Unix style find.exe. You can fix this by explicitly putting your MSYS find.exe directory before the Windows find.exe directory (which should be something like C:\Window\System32\find.exe).

This was a very hard problem to track down and you can see my progress (and that of Ron, who kindly helped me a lot, thanks Ron!) on the 'official' building Bitcoin thread on bitcointalk.org. Starting at page 28 and continuing down until you don't see my name anymore (I'm called Jori there too, it's my real name).