Pages:
Author

Topic: Help Compiling Litecoin for Windows (Read 9698 times)

newbie
Activity: 18
Merit: 0
September 20, 2013, 03:43:05 PM
#35
i was able to compile bitcoin and litecoin but litecoin crashes at start Cry
member
Activity: 84
Merit: 10
May 13, 2013, 09:16:56 AM
#34
I've compiled Bitcoind and Bitcoin-Qt AND PPCoind directly under Windows and MinGW.

How about litecoin?
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
May 13, 2013, 07:56:57 AM
#33
I've compiled Bitcoind and Bitcoin-Qt AND PPCoind directly under Windows and MinGW.
member
Activity: 84
Merit: 10
May 13, 2013, 07:53:10 AM
#32
May i suggest using gitian and gitian-win32 on linux and crosscompile, you will thank me later.


There is updated files here

 https://github.com/franko-org/franko/tree/master/contrib/gitian-descriptors


I appreciate that and I'll try that later on, I just know a lot of people have trouble doing this so I figured if I try to figure this out and document my efforts in this thread it'll help a lot of people down the road.
member
Activity: 70
Merit: 10
May 12, 2013, 07:44:28 PM
#31
this is the berkeley DB include file, put it in your -I path.
legendary
Activity: 2198
Merit: 1014
Franko is Freedom
May 12, 2013, 07:21:08 PM
#30
May i suggest using gitian and gitian-win32 on linux and crosscompile, you will thank me later.


There is updated files here

 https://github.com/franko-org/franko/tree/master/contrib/gitian-descriptors
full member
Activity: 168
Merit: 100
May 12, 2013, 07:16:00 PM
#29
Obviously, you need db_cxx.h somewhere in include dir. It's from berkeley db, as I remember.
member
Activity: 84
Merit: 10
May 12, 2013, 07:05:56 PM
#28
bump
member
Activity: 84
Merit: 10
May 11, 2013, 04:24:34 PM
#27
Ok I successfully compiled the daemon, when I try to compile litecoin.exe here is what I get

sr. member
Activity: 403
Merit: 251
May 10, 2013, 02:06:39 PM
#26
Another daemon compile error, "Building headless Bitcoin and Bitcoin-qt on Windows" says
 3.3 From a Windows command prompt run:
 cd C:\bitcoin\bitcoin-master\src
 mingw32-make -f makefile.mingw


That's ok for bitcoin-master, litecoin0.6.3c gives me this error:
make (e=5): Access is denied

But it works from MinGw/MSYS shell.
hero member
Activity: 630
Merit: 502
May 09, 2013, 01:38:06 PM
#25
damn, can't believe I didn't notice the lack of a U. That's copy and paste for you. I wondered why it didn't make a difference. Cheesy

Still with the method I mentioned above you can compile with UPNP support if you want it.
sr. member
Activity: 462
Merit: 250
May 09, 2013, 01:34:37 PM
#24
Sorry i made a mistake it has to be USE_UPNP=

Sorry for the forgotten "u" Smiley
hero member
Activity: 630
Merit: 502
May 09, 2013, 01:31:48 PM
#23
OK figured out the correct way to resolve this issue by actually reading doc/build-msw.txt

Download this and extract to C:\deps

In a command prompt:
Code:
cd C:\deps\miniupnpc-1.8.20130503
mingw32-make -f Makefile.mingw
mkdir miniupnpc
copy *.h miniupnpc

In your alt coins src folder open makefile.mingw and change the miniupnpc part to this:
Code:
ifdef USE_UPNP
 INCLUDEPATHS += -I"C:\deps\miniupnpc-1.8.20130503"
 LIBPATHS += -L"C:\deps\miniupnpc-1.8.20130503"
 LIBS += -l miniupnpc -l iphlpapi
 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif

The daemon should compile without problems after that regardless of whether or not you add USE_PNP= to the build parameters. You can even remove the comment on the line I mentioned in my previous post (if you added it).

Still trying to figure out why I can't get the wallet to compile though.  Cry
hero member
Activity: 630
Merit: 502
May 08, 2013, 08:18:04 PM
#22
I found commenting out this line worked:
Code:
USE_UPNP:=0

At least when it came to compiling the daemon anyway.
member
Activity: 84
Merit: 10
May 08, 2013, 08:11:33 PM
#21
compile with USE_UPNP= at the end of compiling statement

will give that a shot when I get home today so basically your saying I should type into the command line the following

Quote
mingw32-make -f makefile.mingw USE_PNP=

correct

I got the same error, if I went into the source and commented out miniupnp.h would that be adviseable?
sr. member
Activity: 462
Merit: 250
May 08, 2013, 07:00:53 AM
#20
compile with USE_UPNP= at the end of compiling statement

will give that a shot when I get home today so basically your saying I should type into the command line the following

Quote
mingw32-make -f makefile.mingw USE_PNP=

correct
member
Activity: 84
Merit: 10
May 08, 2013, 06:56:48 AM
#19
compile with USE_UPNP= at the end of compiling statement

will give that a shot when I get home today so basically your saying I should type into the command line the following

Quote
mingw32-make -f makefile.mingw USE_PNP=
sr. member
Activity: 462
Merit: 250
May 08, 2013, 06:26:04 AM
#18
compile with USE_UPNP= at the end of compiling statement
member
Activity: 84
Merit: 10
May 08, 2013, 06:23:19 AM
#17
Bump for answers
member
Activity: 84
Merit: 10
May 07, 2013, 06:28:59 PM
#16
New Problem, this one I think I know how to fix but thought I'd still post it cause I'm sure someone reading this thread in the future will have the same problem and will need the solution so if you know the solution please respond.



the contents of my makefile

Quote
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.

USE_UPNP:=0

INCLUDEPATHS= \
 -I"C:\deps\boost_1_53_0" \
 -I"C:\deps\db-4.8.30.NC\build_unix" \
 -I"C:\deps\openssl-1.0.1e\include"

LIBPATHS= \
 -L"C:\deps\boost_1_53_0\stage\lib" \
 -L"C:\deps\db-4.8.30.NC\build_unix" \
 -L"C:\deps\openssl-1.0.1e"

LIBS= \
 -l boost_system-mgw46-mt-sd-1_53 \
 -l boost_filesystem-mgw46-mt-sd-1_53 \
 -l boost_program_options-mgw46-mt-sd-1_53 \
 -l boost_thread-mgw46-mt-sd-1_53 \
 -l db_cxx \
 -l ssl \
 -l crypto

DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6 -D__NO_SYSTEM_INCLUDES
DEBUGFLAGS=-g
CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)

TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)

ifdef USE_UPNP
 INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
 LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
 LIBS += -l miniupnpc -l iphlpapi
 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif

LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock

-l shlwapi

# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
HEADERS = $(wildcard *.h)

OBJS= \
    obj/version.o \
    obj/checkpoints.o \
    obj/netbase.o \
    obj/addrman.o \
    obj/crypter.o \
    obj/key.o \
    obj/db.o \
    obj/init.o \
    obj/irc.o \
    obj/keystore.o \
    obj/main.o \
    obj/net.o \
    obj/protocol.o \
    obj/bitcoinrpc.o \
    obj/rpcdump.o \
    obj/rpcnet.o \
    obj/rpcrawtransaction.o \
    obj/script.o \
    obj/scrypt.o \
    obj/sync.o \
    obj/util.o \
    obj/wallet.o \
    obj/walletdb.o \
    obj/noui.o


all: litecoind.exe

obj/scrypt.o: scrypt.c
   gcc -c $(CFLAGS) -o $@ $^

obj/%.o: %.cpp $(HEADERS)
   g++ -c $(CFLAGS) -o $@ $<

litecoind.exe: $(OBJS:obj/%=obj/%)
   g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

obj-test/%.o: test/%.cpp $(HEADERS)
   g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<

test_litecoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
   g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)

clean:
   -del /Q litecoind test_litecoin
   -del /Q obj\*
   -del /Q obj-test\*
   -del /Q build.h
Pages:
Jump to: