I am trying to compile an altcoin based on Litecoin. I've successfully compiled it for Linux but struggle with Windows compiling. I'm most comfortable compiling on Linux and have tried to create the Windows executable using Ubuntu and other Linux flavors, but so far to no avail.
My latest attempts make use of the
M Cross Environment. I have installed this and follow
this approach, but when it runs this is the output:
$ ~/mxe/usr/i686-pc-mingw32.static/qt/bin/qmake && make
Project MESSAGE: Building with UPNP support
sh: ~/mxe/usr/i686-pc-mingw32.static/qt/binlrelease.exe: No such file or directory
Project MESSAGE: Building with UPNP support
sh: ~/mxe/usr/i686-pc-mingw32.static/qt/binlrelease.exe: No such file or directory
Project MESSAGE: Building with UPNP support
sh: ~/mxe/usr/i686-pc-mingw32.static/qt/binlrelease.exe: No such file or directory
make -f Makefile.Release
make[1]: Entering directory '~/my_altcoin/source'
cd ~/my_altcoin/source/src/leveldb && CC=i686-pc-mingw32.static-gcc CXX=i686-pc-mingw32.static-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE make OPT="-pipe -fno-keep-inline-dllexport -D_FORTIFY_SOURCE=2 -O2" libleveldb.a libmemenv.a && i686-pc-mingw32.static-ranlib ~/my_altcoin/source/src/leveldb/libleveldb.a && i686-pc-mingw32.static-ranlib ~/my_altcoin/source/src/leveldb/libmemenv.a
make[2]: Entering directory '~/my_altcoin/source/src/leveldb'
make[2]: 'libleveldb.a' is up to date.
make[2]: 'libmemenv.a' is up to date.
make[2]: Leaving directory '~/my_altcoin/source/src/leveldb'
i686-pc-mingw32.static-g++ -Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -Wl,-s -mthreads -Wl,-subsystem,windows -o release/my_altcoin-qt.exe object_script.my_altcoin-qt.Release -L'~/mxe/usr/i686-pc-mingw32.static/qt/lib' -lmingwthrd -lmingw32 -lqtmain build/bitcoin-qt_res.o -lminiupnpc -liphlpapi ~/my_altcoin/source/src/leveldb/libleveldb.a ~/my_altcoin/source/src/leveldb/libmemenv.a -lshlwapi -ldb_cxx -lshlwapi -lmswsock -lboost_system-mgw44-mt-s-1_50 -lboost_filesystem-mgw44-mt-s-1_50 -lboost_program_options-mgw44-mt-s-1_50 -lboost_thread-mgw44-mt-s-1_50 -lboost_chrono-mgw44-mt-s-1_50 -lQtGui -lQtNetwork -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lmng -llcms2 -lm -ltiff -llzma -ljpeg -lpng -lQtCore -lssl -lcrypto -lgdi32 -lcrypt32 -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz
./build/bitcoin.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile.Release:280: recipe for target 'release/my_altcoin-qt.exe' failed
make[1]: *** [release/my_altcoin-qt.exe] Error 1
make[1]: Leaving directory '~/my_altcoin/source'
Makefile:34: recipe for target 'release' failed
make: *** [release] Error 2
Has anybody achieved compiling litecoin-qt on Linux using MXE? Is another approach recommended? So far it's a real pain. I am just not sure where this error comes from or where to search for solutions.
Thanks for any advice.