can i compile BU from Visual Studio 2010?

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
ok then i'm downloading mingw!

installing all "Basic Setup" Packages i hope thats enough
[doublepost=1458271550][/doublepost]what is the URL for the repository?
[doublepost=1458271776][/doublepost]https://github.com/BitcoinUnlimited/BitcoinUnlimited.git

lets plug that into TortoiseSVN and see what happens...
[doublepost=1458271990][/doublepost]"Server sent unexpected return value (504 Gateway Timeout) in response to REPORT"
dang.
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
mingw doesn't have an IDE? ( no GUI with a debuger and such? )

i want to get setup to compile and debug bitcoinunlimited on windows
[doublepost=1458272499][/doublepost]well i got SVN downloading the thing 1 step done!
 
Last edited:

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
well i'm making good progress trying to build with mingw
https://bitcointalk.org/index.php?topic=149479.0
had a problem setting my %PATH%, but finally got step 2.1 and 2.2 building...building...built!
not exactly a straightforward setting this up....
well now its 1:00am... hopefully i can build bitcoin from the src tomorrow night!

i opened up a few C++ files, I guess bitcoind.cpp is the place to start reading... or maybe bitcoin-tx.cpp?

1:20am
i'm burnt...
 

theZerg

Moderator
Staff member
Aug 28, 2015
1,012
2,327
I use emacs on linux and visual studio on win... its awesome to get more windows native devs, we need representation there.
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
if i can make it compile on VS i will want to do that...

@theZerg

what version of VS, 2010?
I do not see any .sln in the src.
is there some tutorial on how to setup myself up on VS somewhere?

i'm a competent C++ dev, I work with it day in day out. but this is the very first time i look at BTC src...
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
thanks this helps alot!
watch out BU devs, a newbie is about to bombard you with questions! ( once i manage to compile...)
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
I've built the libs : boost OpenSSL Berkeley DB and that other one i need

I even managed to compile main.cpp in VS2010
Build: 1 succeeded, 0 failed

however it did require one thing
Code:
#define __func__ __FUNCTION__
(y)
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
@theZerg
@YarkoL
@Peter Tschipper

what version of BOOST are you using, i built with BoostV1.53
and i get #error missing boost sleep implementation

also can't seem to find
"#include <event2/bufferevent.h>"
is event2 another lib i need?
 

Peter Tschipper

Active Member
Jan 8, 2016
254
357
@adamstgbit try to use 1.59 or greater...i'm on 1.61

also, look under the docs section, you'll find installation notes for windows in build-windows-mingw.md

it describes all the dependencies and how/where to get them from...

there are other developer notes you should read over to help get you started.
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
@Peter Tschipper
right,
i'll get 1.61
i was looking that this guide for building in VS2005
i'm building this in VS2010
looking at build-windows-mingw.md seems i'm missing a few dependencies...
Ill let you guys know once i can build and run.
thanks.
 

Justaphf

New Member
Aug 6, 2016
3
0
If you are still trying to get MinGW setup and working on Windows, you can look at https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/85 It's basically a set of batch scripts which automate the steps described in build-windows-mingw.md as much as possible for setting up the development environment on Windows, including all dependencies. There are a couple of manual steps you have to do once, but after that it's fully automated to setup the environment and to build the source. It's still marked as WIP because I need to update the documentation (and some of the dependency versions should be updated) but it's basically done and working once you understand how to set up the configuration file. I just need to update the documentation for it to be "finished". It would be great for someone else developing on Windows to test it out, I've run it successfully on several Windows 10 machines from scratch, but I haven't tested any other versions.

I've been using it for building while using VS2015 for code editing/navigation.

Quick Guide:
1. Download and install the MinGW-64 base (http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)
2. Download and install 7zip (doesn't matter if it is 32 or 64 bit)
3. Download your favorite git client (I use GitHub Desktop, it's fairly minimalist, but I do most work from the commandline anyway).
4. Clone source code.
5. Copy the 8 files from PR85 and place them under .\BitcoinUnlimited\build-aux\mingw\*
6. Edit SET_ENV_VAR.bat to match your system configuration. At a minimum you need to set
6.a. MINGW_ROOT - the path you installed the mingw base
6.b. CMD_7ZIP - the path you installed 7-zip
6.c. PATH_DEPS - the location to which all dependencies will be downloaded and compiled. NOTE: Make sure this is a path you have write access to w/o admin permissions.
6.d. BITCOIN_GIT_ROOT - only need to modify this if you didn't place the PR85 files in the specified path.
6.e. BUILD_32_BIT and/or BUILD_64_BIT - just need to uncomment whichever mode you want to build, you can do one or both at the same time. I have set up the scripts such that final build outputs will move to an output location for x86 and x64 so you can have both.
6.f. MAKE_CORES - recommend you set this to the number of cores your PC has, the value should be in the form "-jN" where N is the number of cores.
7. First-time setup, double-click on config-mingw.bat, give it time to complete.
8. Build just bitcoin (not the dependencies), double-click on rebuild-bitcoin.bat
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
thanks @Justaphf

I'll probably get a chance to finish setting-up (thanks to your help) sometime soon
For now, I just want to be able to run BU in debug, and hit some break points and start reading the code (SLOWLY)
work keeps me busy... and its not like i want to work 9-5 and then work another few hours on BU code every day, so this will be a slow process.
But eventually i wish to be an active contributor.

Cheers!