Pages:
Author

Topic: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2 (Read 10943 times)

sr. member
Activity: 260
Merit: 251
Hi all,

I couldn't wait any longer... Yes there are a few faux pas etc. but I think the ideas are clear.  Here is the video series on building bitcoind.exe and YACoind.exe using MSVS and C++ on windows:
https://www.youtube.com/playlist?list=PLFnWb0ttBBMLyUuniLp3PJ5Mn4tVUlliZ
there are 4 static library building videos, all short, and a two part finale  Smiley
Hope this helps those that are "gcc desperate"  Grin  I'm just offering an alternative to the current methods.  It passes the unit test too, BTW.

Ron
Hello,

In case anyone cares, I've just compiled bitcoind 0.9.0.99 in debug and release mode and they work!  I will be attempting a bitcoin pull request soon...

All of those who are having trouble building *coind.exe daemons might consider building them on MSVC++.  So far I've built 3 other daemons successfully.

Ron
sr. member
Activity: 260
Merit: 251
Hi all,
On 3/13/2014 ~ 12:00 EST, the leveldb dragon has been slain, and bitcoind now works in debug and release mode!  Much more to follow, stay tuned...

Videos on how to build your own BerkeleyDB 4.8.30, OpenSSL, Boost 1.53 (that one is easy!) and levelDB1.12 static multi-threaded libraries for MSVC++ 2005 or later (2008, 2010, 2011, 2012, 2013) Express or full.  And yes, *coind.exe's work too!
Ron
Hello all,

I promised videos on MSVC++ static library building for bitcoind.exe & *coind.exe --
and here they are:
http://www.youtube.com/channel/UCytoaHvG3H1y9CnxZS819eQ

The links to the sources to build bitcoind.exe 0.8.6 are given in message # 43:
https://bitcointalksearch.org/topic/m.6284139

The last video on actually building bitcoind.exe and one other *coind.exe using those libraries is almost done, but those practiced in the art probably won't need it Grin

I would be interested in feedback.  And I would hope that this allows a stampeding herd of Windows developers to jump in and contribute to the bitcoin and other *coin projects.

Ron
Hi all,

I couldn't wait any longer... Yes there are a few faux pas etc. but I think the ideas are clear.  Here is the video series on building bitcoind.exe and YACoind.exe using MSVS and C++ on windows:
https://www.youtube.com/playlist?list=PLFnWb0ttBBMLyUuniLp3PJ5Mn4tVUlliZ
there are 4 static library building videos, all short, and a two part finale Smiley

Hope this helps those that are "gcc desperate"  Grin  I'm just offering an alternative to the current methods.  It passes the unit test too, BTW.

Ron
sr. member
Activity: 260
Merit: 251
Hi all,
On 3/13/2014 ~ 12:00 EST, the leveldb dragon has been slain, and bitcoind now works in debug and release mode!  Much more to follow, stay tuned...

Videos on how to build your own BerkeleyDB 4.8.30, OpenSSL, Boost 1.53 (that one is easy!) and levelDB1.12 static multi-threaded libraries for MSVC++ 2005 or later (2008, 2010, 2011, 2012, 2013) Express or full.  And yes, *coind.exe's work too!
Ron
Hello all,

I promised videos on MSVC++ static library building for bitcoind.exe & *coind.exe --
and here they are:
http://www.youtube.com/channel/UCytoaHvG3H1y9CnxZS819eQ

The links to the sources to build bitcoind.exe 0.8.6 are given in message # 43:
https://bitcointalksearch.org/topic/m.6284139

The last video on actually building bitcoind.exe and one other *coind.exe using those libraries is almost done, but those practiced in the art probably won't need it Grin

I would be interested in feedback.  And I would hope that this allows a stampeding herd of Windows developers to jump in and contribute to the bitcoin and other *coin projects.

Ron
sr. member
Activity: 260
Merit: 251
Hi all,
On 3/13/2014 ~ 12:00 EST, the leveldb dragon has been slain, and bitcoind now works in debug and release mode!  Much more to follow, stay tuned...
Videos on how to build your own BerkeleyDB 4.8.30, OpenSSL, Boost 1.53 (that one is easy!) and levelDB1.12 static multi-threaded libraries for MSVC++ 2005 or later (2008, 2010, 2011, 2012, 2013) Express or full.  And yes, *coind.exe's work too!
Ron
Hello Claire  and all,

I did it, finally! Here is a pix that was live on 3/27/14

and after more (lots more) testing, I discovered that when bitcoind.exe is used as an RPC "front end" to command another actually running bitcoind.exe, when MSVC version does the exit() function, bad things happen Shocked 

Well I finally solved that, so here is a late pix,

notice at startup, if -printtoconsole is on, one sees not only the OpenSSL version, but now in addition, the Boost and levelDB versions!  Also note that the OpenSSL version is the "heartbeat corrected" 1.0.1g Grin

Here is a Github link to get one to the .zip sources:

https://github.com/bc4-old-c-coder/bitcoin/tree/0.8.6
from
https://github.com/bc4-old-c-coder/bitcoin/commit/f0d221e56a12947b67b9c8f43cc5832b665052c8
the zip if those don't "fly"
https://github.com/bc4-old-c-coder/bitcoin/archive/0.8.6.zip

Ron
newbie
Activity: 25
Merit: 0
Hi Ron,  I used Adobe Captivate and a Plantronics C420-M headset (wired).  I chose the headset because it looked to be the most comfortable since I have to wear it quite a bit for my work.  Also, I know you can drag and drop folders into VS but it's really cool that cmake will also set up all the special compile and link options you want.  The hard part is with Qt files if you don't have the VS Qt plugin.  I want to see if cmake can automate that part.  I've read that it can but I have not had time to look into yet.

Claire Smiley
sr. member
Activity: 260
Merit: 251
build 0.9.0 really?
I am considering doing a port of 0.9.0 to VS2013, but I won't promise anything.  I am currently having fun and learning new things with other projects:

https://bitcointalksearch.org/topic/snap-qr-image-from-screen-and-import-as-a-wallet-or-send-to-address-555155

I also want to learn more about cmake and possibly using that to create Visual Studio project files instead of writing them myself.
Hi Claire,

I liked your video!  What microphone did you use, since I didn't hear any "room echo"?  And do you use CamStudio?

Also, who writes VS project files?  I have never written one!  I usually just create a directory level or two where a new "solution-project" will be and "unzip-explode" a bunch of source, ala bitcoin-0.8.6.zip or your bitcoinqtmsvc2012-32194.zip there and then "do" a "New Project from Existing Code",  name the project, which sometimes is the hardest part (!), and then only add directories that have sources I will use.  Then it is usual trivial, right-clicking a directory in the solution explorer and "Include In Project" or "Exclude From Project".  Set a few Preprocessor defines that are usually "*coin" specific, and that's about it Grin  Well a few "project" linker - Input - Additional Dependencies, again *coin specific, but that is for my videos Smiley

Ron
newbie
Activity: 25
Merit: 0
build 0.9.0 really?

I am considering doing a port of 0.9.0 to VS2013, but I won't promise anything.  I am currently having fun and learning new things with other projects:

https://bitcointalksearch.org/topic/snap-qr-image-from-screen-and-import-as-a-wallet-or-send-to-address-555155

I also want to learn more about cmake and possibly using that to create Visual Studio project files instead of writing them myself.
newbie
Activity: 10
Merit: 0
Huh
build 0.9.0 really?
Is that a question?   Or a comment?  Or a ? Huh

Ron

I want to make BTC wallet 0.9.0 version (in ubuntu and qt creator)
but here is a problem that file bitcoin-gt.pro which used for 0.8.6 is dissapeared.
But it suits for me variant of installation in VS
sr. member
Activity: 260
Merit: 251
 Huh
build 0.9.0 really?
Is that a question?   Or a comment?  Or a ? Huh

Ron
newbie
Activity: 10
Merit: 0
build 0.9.0 really?
newbie
Activity: 25
Merit: 0
Congratulations, Ron  Grin

I have updated the opening post with new information.  As promised, I have project files and build scripts now for VS2013.  But, now, they are on Github.   The projects at codeplex will remain 0.8.6 and VS2012.
sr. member
Activity: 260
Merit: 251
...
Hi Ron, I'm glad you got the release mode working.  I think it was much easier for me being on a newer version of MSVC.  My first versions of the project did set the ITERATOR_DEBUG_FLAG off but I decided to see if I could get it turned back on by making some code changes to those vectors.   If I have time, I might remove some of the #ifdef statements dealing with CBlockIndexWorkComparator to see if the code compiles and works on Linux.  But, I've been swamped with work from my day job, which has morphed into getting Asterisk up and running on Red Hat so now it's vi and bash all the time for me...

By the way, I think you are the C++ expert here!  I just learn enough to be productive.  Every now and then I will refer to the Stroustrup book if I have to figure out code written by the real experts but I don't crack it open for pleasure reading...Smiley


Hi Claire,

Release mode working?  Roll Eyes  I just said I was able to compile it without errors!  That is a long way from working!  I too have to set the define _HAS_ITERATOR_DEBUGGING=0 just in order to be able to run a debug version!  Actually I have to do even more.  The (first?) culprit is somewhere in VerifyDB() level 2, which I am chasing down now, now that I know a little more about vector.
...
Speaking of _DEBUG and NDEBUG mode, there seems to be a bit of chatter about bitcoind and bitcoin-qt (gcc on windows) versions having to be "debug" compiled?  Certainly the "older" makefile.mingw have the line
BOOST_SUFFIX?=-mgw46-mt-sd-1_52 and the -g argument, which most certainly is the debug version!  So a 64K question is: HAS ANYBODY gcc COMPILED A NON-DEBUG Bitcoind.exe?  And if so, did/does it work?  Really?  Then if it does, how about the Makefile.Release and Makefile.Debug files that make Bitcoin-qt.exe?  I see suspicious -lboost_program_options-mgw46-mt-sd-1_53 \ lines in there too. Smiley  Does the bitcoin-qt.pro python-esk qmake concoction make a distinction between debug and not debug in all its files?  I think it does, but one has to carefully check one's bitcoin-qt.pro and the Makefile.Release it produces to make sure everything is "Kosher".

Any thoughts, anyone?
...

Hi all,

On 3/13/2014 ~ 12:00 EST, the leveldb dragon has been slain, and bitcoind now works in debug and release mode!  Much more to follow, stay tuned...

Videos on how to build your own BerkeleyDB 4.8.30, OpenSSL, Boost 1.53 (that one is easy!) and levelDB1.12 static multi-threaded libraries for MSVC++ 2005 or later (2008, 2010, 2011, 2012, 2013) Express or full.  And yes, *coind.exe's work too!

Ron
newbie
Activity: 25
Merit: 0
I modified the batch files that build Qt 32 and 64 to specify the visual studio version before building:

set VisualStudioVersion=11.0

This may solve issues with building Qt using VS2012 when you also have VS2013 installed.

I will be upgrading the project files to VS2013 in the next few weeks.
newbie
Activity: 25
Merit: 0
Thanks, I will fix the boost batch file.  I never had any problem so I guess it was defaulting to the correct toolset on my system.  I don't have VS2013 installed yet.
sr. member
Activity: 322
Merit: 250
Thank you for finding the upnp issue! Smiley  I have checked in a fix for the batch file.  When I was first working on the miniupnp code to create a suitable project file, I forgot that I had copied the .in to a .h to get it all to build and work.  My batch file doesn't put any meaningful information into those two strings but I don't think that will cause a problem. If it does, however, I can just create my own version of the .h file and copy it over to use for the miniupnp build.

As far as your Qt64 build issue, it sounds like an issue with dynamic vs static libs.  The statement in the batch file that calls perl to change the build options from dynamic to static in the qmake.conf file must run correctly.  If you are using a different version of VS, like 2010, then the batch file needs to modify a qmake.conf file in a different directory (as well as other changes)  Also, if you start building and anything goes wrong, don't start over unless you have a clean copy of the qt distribution.  It's pretty picky.   I hope this helps.

Thanks for trying all this out--I really appreciate it!

By the way, I have never used mingw on this machine--a Win 8 64 bit.  I did install mingw and built the bitcoin daemon only on another Windows system and that experience convinced me that something needed to change  Grin

I am running on VS 2012 Ultimate, so that shouldn't be the problem. I finally gave up and downloaded the Qt from Digia that was already built.


I also found a problem with buildboost.bat though.

The bjam for x64 part works correctly, but the bjam for x86 is missing:
--toolset=msvc-11.0

With the result is it builds for the 12.0 toolset, and thus you can't link on x86 due to missing libs. Adding --toolset=msvc-11.0 solves it.
newbie
Activity: 25
Merit: 0
Thank you for finding the upnp issue! Smiley  I have checked in a fix for the batch file.  When I was first working on the miniupnp code to create a suitable project file, I forgot that I had copied the .in to a .h to get it all to build and work.  My batch file doesn't put any meaningful information into those two strings but I don't think that will cause a problem. If it does, however, I can just create my own version of the .h file and copy it over to use for the miniupnp build.

As far as your Qt64 build issue, it sounds like an issue with dynamic vs static libs.  The statement in the batch file that calls perl to change the build options from dynamic to static in the qmake.conf file must run correctly.  If you are using a different version of VS, like 2010, then the batch file needs to modify a qmake.conf file in a different directory (as well as other changes)  Also, if you start building and anything goes wrong, don't start over unless you have a clean copy of the qt distribution.  It's pretty picky.   I hope this helps.

Thanks for trying all this out--I really appreciate it!

By the way, I have never used mingw on this machine--a Win 8 64 bit.  I did install mingw and built the bitcoin daemon only on another Windows system and that experience convinced me that something needed to change  Grin
sr. member
Activity: 322
Merit: 250
One more thing - the buildminiupnpc.bat script does not correctly build miniupnp.

There is no header from 'miniupnpcstrings.h', it's built if you run updateminiupnpcstrings.sh, which the build script doesn't do. Of course you can't just run a .sh in conhost, but if you run it under MinGW it gives a:


/* $Id: miniupnpcstrings.h.in,v 1.5 2012/10/16 16:48:26 nanard Exp $ */
/* Project: miniupnp
 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * Author: Thomas Bernard
 * Copyright (c) 2005-2011 Thomas Bernard
 * This software is subjects to the conditions detailed
 * in the LICENCE file provided within this distribution */
#ifndef MINIUPNPCSTRINGS_H_INCLUDED
#define MINIUPNPCSTRINGS_H_INCLUDED

#define OS_STRING "MINGW32_NT-6.2/1.0.18(0.48/3/2)"
#define MINIUPNPC_VERSION_STRING "1.8"

#endif


It would be useful to however build this file from your build script as well. You probably have an old one lying around in your directory created by MinGW which may be why it builds for you.

sr. member
Activity: 322
Merit: 250
I have a bunch of link errors trying to build a 64-bit version of QT.

Qt5Core.lib(qstring.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
Qt5Core.lib(qlist.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
Qt5Core.lib(qarraydata.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
Qt5Core.lib(qiodevice.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
Qt5Core.lib(qcoreapplication.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
Qt5Core.lib(qfiledevice.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease'
...
MSVCRT.lib(MSVCR110.dll) : error LNK2005: free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: realloc already defined in LIBCMT.lib(realloc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: memmove already defined in LIBCMT.lib(memcpy.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: memchr already defined in LIBCMT.lib(memchr.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _ftelli64 already defined in LIBCMT.lib(ftelli64.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _lseeki64 already defined in LIBCMT.lib(lseeki64.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: strcpy_s already defined in LIBCMT.lib(strcpy_s.obj)


Any idea how to resolve it?
newbie
Activity: 25
Merit: 0
Thanks, I updated my readme to include download links for the perl and python packages.

I'm pretty sure that nasm.exe and nasmw.exe now come with VS2012, at least the Ultimate version.

I really don't remember downloading them but don't have a fresh install to check.
 I could be wrong Smiley

However, I also use VS2010 and that didn't come with any nasm exe files which is why I used Netwide in the past.

Edit.  I was wrong.  I had an old version of nasm lying around.  I will update my readme again.  Thanks!
sr. member
Activity: 322
Merit: 250
Actually, I put a readme file in the build helper directory that says this:
Quote
These batch and project files build all the dependencies you need for the *coin daemon and Qt application, both 32 and 64 bit versions. But you need to fix them up before you can use them. The first thing you should do is move this folder to the root of your BitcoinDeps directory. You also need to make sure that ActivePerl is in your path and MSVC12 is installed in it's normal place. If not, edit the batch file as needed.

Ok, thanks - missed the perl path. But still needs python (and nasm) as well. Unfortunately the build scripts don't check for it in the beginning, so you could be compiling for an hour, only to have it fail after.

As far as nasm goes, I am using the nasm that comes with VS.  But in the past I have used the Netwide Assembler.  Is there any advantage to switching?

Visual Studio doesn't have a 'nasm'. It has masm (launched via ml.exe or ml64.exe). I don't mind using ml.exe but your openssl build script specifically looks for nasm. (In this case ml.exe was in my path if it wanted to use that instead.)

Pages:
Jump to: