Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Claire123 on November 27, 2013, 04:23:52 PM



Title: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: Claire123 on November 27, 2013, 04:23:52 PM
I forked a new project (again) from Bitcoin and committed the fixes for a port to Visual Studio 2013 on the 0.8.6 branch here:

https://github.com/ClaireDuSoleil/bitcoin/tree/0.8.6

This project builds the daemon, Qt app, and all the dependencies in 32 and 64 bit.  I re-worked the batch scripts that build the dependencies so please check out the readme:

https://github.com/ClaireDuSoleil/bitcoin/blob/0.8.6/MSVC/README.md

The projects at codeplex are still VS2012 and I don't currently have plans to continue updating these repositories:

Litecoin(0.8.6.2) :  https://coindusoleil.codeplex.com/ (https://coindusoleil.codeplex.com/)

Bitcoin(0.8.6) : https://bitcoinqtmsvc2012.codeplex.com/ (https://bitcoinqtmsvc2012.codeplex.com/)

Please let me know if you notice any issues.  Thank you.



Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: wumpus on November 27, 2013, 06:33:27 PM
That's pretty impressive! I tried the same a few years ago with VC2010.

I'm not sure I see the point of creating a new codeplex project though, do you plan to contribute back the changes that were needed to github?


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: Claire123 on November 27, 2013, 07:25:03 PM
I'm not sure I see the point of creating a new codeplex project though, do you plan to contribute back the changes that were needed to github?

I just wanted a place to store the solution while I play with it and also let others access it, if they are interested.  I'm also used to TFS but not "git".  Anyway, if I make any changes that people actually care about, then I can add them to github.

I based the port on this source, not the latest from github:

http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.8.5/bitcoin-0.8.5-win32.zip/download

I just did a diff on main.h from the latest on github to the source that I started with and it's already way different. 

I'm having issues with InvalidChainFound and I'm stepping through it now to debug.


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: inkadnb on November 27, 2013, 08:20:28 PM
Any chance you can fork off of the github project and make these changes?

That way we can do pull requests easily from github to the official project.

Or better yet, see if you can get these changes pushed up to the official project so that's all we need.

Thanks



Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: dsattler on November 28, 2013, 07:27:25 AM
I really appreciate your work! I had just an idea for an improvement of bitcoin-qt, but as a VC++ developer I thought to save the trouble...

If I have the time I will look into it. Keep up the good work!


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: wumpus on November 28, 2013, 08:13:19 AM
I just wanted a place to store the solution while I play with it and also let others access it, if they are interested.  I'm also used to TFS but not "git".  Anyway, if I make any changes that people actually care about, then I can add them to github.
Compatibility changes (if contained) would certainly be welcome!
Quote
I based the port on this source, not the latest from github:

http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.8.5/bitcoin-0.8.5-win32.zip/download
That makes it more difficult to merge back changes, as they'd have to be forward ported to 0.9.

Our development process usually goes the other way around: develop on 0.9 and backport to 0.8.

Then again I expect most compatibility changes to carry forward pretty straightforwardly.

Quote
I just did a diff on main.h from the latest on github to the source that I started with and it's already way different.  
It's preferred to have a commit after every (logical) change instead of one big diff, to be able to review what was changed for which reason.

Quote
I'm having issues with InvalidChainFound and I'm stepping through it now to debug.
That's strange. Maybe an issue with the block database, in that case a -reindex will likely solve it. Unless there's a bug that somehow keeps corrupting it ofcourse.



Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: Claire123 on December 02, 2013, 05:29:35 PM
I've updated the first post to emphasize that this project should only be used for educational purposes unless you really understand the code--and I don't, so I've switched over to testnet-in-a-box.

I have found a couple of issues, one of which caused me considerable grief.  The Bitcoin 0.8.5 source code relies on the ASSERT macro being active, even in release mode.  In wallet.cpp there is a line:

assert(reservekey.GetReservedKey(vchPubKey));

When you create new projects in MSVC, the release mode configuration, by default, has NDEBUG defined and, if NDEBUG is defined, ASSERT statements are NOPed.  This means that line of code from wallet.cpp gets skipped in a release mode compile and it contains a critical statement.  If that statement is NOPed, "change" from a BTC send transaction will be sent to a bogus address based on an empty string (1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E).   It was all working so well in debug mode so I switched over and whamo.  Well, it was quite a wake up call.

Live and learn.  When it first happened, I thought I had been hacked so I'm grateful that it was just a bug in the way I created the MSVC project.


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: rarkenin on December 02, 2013, 10:25:38 PM
The Bitcoin 0.8.5 source code relies on the ASSERT macro being active, even in release mode.

This is a poor coding style in the original upstream, IMHO. Not that I'm a C++ developer by any means, I just hate these bugs in Java development.


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: Claire123 on December 05, 2013, 08:43:00 PM
I've created a github project from a fork of bitcoin.  The original post has been updated with the details.


Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: wumpus on December 06, 2013, 12:30:46 PM
The Bitcoin 0.8.5 source code relies on the ASSERT macro being active, even in release mode.

This is a poor coding style in the original upstream, IMHO. Not that I'm a C++ developer by any means, I just hate these bugs in Java development.
Right, it was poor coding style, but recently this was fixed
https://github.com/bitcoin/bitcoin/commit/9b59e3bda8c137bff885db5b1f9150346e36e076

I've created a github project from a fork of bitcoin.  The original post has been updated with the details.
Great!



Title: Re: Ported bitcoin 0.8.5 to VS2012 and QT5 to help learn internals
Post by: TheBigYak on December 11, 2013, 07:33:49 PM
Question here to Bitcoin Dev Team.. if this can be stabilized and shown not to affect the build capability on other OSes/build configs, would you consider merging into master at some point?  I'm pondering joining in here, but don't want to spend a lot of time on something that will ultimately always be a one-off.



Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and QT5
Post by: greyman on December 29, 2013, 12:24:09 PM
Please can someone help me to compile the bitcoinqtmsvc2012? I am stuck in the finals steps. Following the instructions, I was able to successfuly compile boost, db, openssl, qt [at leasts it seems it is compiled], and bitcoind, but no luck with bitcoinQT. I am getting the following compiler errors:

3>  Moc'ing walletview.h...
3>  The system cannot find the path specified.
3>  Moc'ing walletstack.h...
3>  The system cannot find the path specified.
3>  Moc'ing walletmodel.h...
etc...


Do you have some hints how to fix this? I googled that it is related to QT, but didn't found the solution. I even installed QT5 plugin for VS2012, but I don't know how to configure it or if is necessary. Thanks for any help.


Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and QT5
Post by: Claire123 on December 29, 2013, 05:03:07 PM
It sounds like Qt did not get built properly or else moc.exe is not where the BitcoinQt project is expecting it to be.  Any .h file that contains a Q_OBJECT declaration must be processed by the Qt moc tool and moc.exe is something that needs to be built when you build Qt.  The BitcoinQt project expects it here:

"..\..\bitcoindeps\qt-everywhere-opensource-src-5.1.1\qtbase\bin\moc.exe" 

If this path does not exist, you will see that error.   Congratulations on your progress so far!  :)

The Qt plugin makes it easier to control or modify the location of the Qt but I didn't want to force people to install the plugin and the BitcoinQt project is not setup to use it which is why all paths are hardcoded in the project file.  It's ugly, I know.


I may not have internet access for a few days so future replies may be delayed--sorry about this.


Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: greyman on December 29, 2013, 07:13:46 PM
Thank you Claire123,
FYI, I was able to compile the whole thing, I am already syncing with the network. ;-) The issue was, that I was not aware the solution folder must be next to the BitcoinDeps folder (in the same parent folder). After I moved it there it compiled without problems.


Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on January 14, 2014, 07:15:01 PM
I have received some private messages and emails asking me some questions so I thought I would post an update here.

Quote
1) As I understand it, it would be great if it could be a part of the main development project - do you think that would be realistic? It would require to make a few changes to the source code, for example some invocations of the IMPLEMENT_SERIALIZE doesn't compile with msvc, and also some other minor things. But the code should certainly be able to be modified to compile in both mingw/linux/msvc. Because as I understand it, you are now basically maintaining separate modified sources for this to work.

2) Would you consider to move all 3rd party libraries into your project? I tried it just today, and for example openssl and boost libraries can be comfortably added to the MSVC project through the NuGet Manager - no need to download, install, and compile them separately. Also the berkeley-db, it's just a bunch of headers and libs, it could be added directly to the project. Also the QT is doable, since we use it at my work, and we just integrated the sources to our source code tree and compile it together with our files. This way, people could just download the msvc solution and it would work out of the box without the need to install anything else.

3) Debugging: Please, did you manage to debug with Visual Studio? My problem is, that the blockchain is being downloaded (using the debug version of the bitcoinqt from your project), but at certain point, there are some nonstandard transactions there, which are handled by try/catch block - there are some invalid indexes to std::vector, which causes exceptions, and those are properly handled by the catch(...). But, every time this exception occurs, the exception dialog box is invoked in Visual Studio, and I must click "Continue"...but this happens hundreds of times, making the debugging practically impossible. I just didn't find any way how to permanently suppress those dialogs (so the breakpoint will not be invoked when handled exception occurs).

1. I really don't have specific plans.  I'm basically learning as I go here, although I'm trying to help out where I can.  I'm may start looking into resurrecting my github project and submitting the changes one or two files at a time, to see if they get accepted.  I'm not sure the Bitcoin team cares about MSVC but I may try a pull request to see what happens.  I need to spend some time learning github better, first, though.  My fear is that they won't want the solution and project files added to the official Bitcoin project.

2.  I'd rather not clutter up the solution any more than it already is.  I feel funny enough having put the QR code project in there now.  I use Qt and openssl in my work as well, but I think my team mates would have a fit if I tried to put them into the solution.  Currently, I build Qt/OpenSsl and give everyone the output in a zip file.  That seems to work the best, especially since we often have to switch back and forth between Qt versions.

3.  Yes, I have run the Bitcoin Qt app extensively in debug mode.  I had to make some code changes to avoid aborts due to the extra error checking in the MS version of the STL.  All the code changes I made for debug mode should be compatible with mingw.  Here is one example but there are several more:

https://bitcoinqtmsvc2012.codeplex.com/SourceControl/changeset/31241



Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: old c coder on January 15, 2014, 07:45:32 AM
Hi Claire

I must answer number 2. in your messages, I hope you don't mind?

I have received some private messages and emails asking me some questions so I thought I would post an update here.

Quote
2) Would you consider to move all 3rd party libraries into your project?
That defeats the whole spirit of the libraries.  They should be separate static library builds to allow a simple rebuild of a newer library version, e.g. OpenSSL 1.0.1e in place of 1.0.1c.  Rebuild the MSVC static library project (minutes at the most) and simply relink the bitcoin project.  Keeping versions straight without library names would seem to quickly lead to insanity, don't you think?

Also, you are mixing their sources in your project.  Surely not ethical or proper.
Quote
Quote
I tried it just today, and for example openssl and boost libraries can be comfortably added to the MSVC project through the NuGet Manager - no need to download, install, and compile them separately.
You picked the two easy ones! They are almost trivial to build in MSVC++ given the instructional help, especially Boost.

You are adding another layer of complexity with NuGet to a simple process that doesn't need more complexity.  And it is (probably) only an easy VS2010 2012 install.  How about other Visual Studios, newer and older?
Quote
Quote
Also the berkeley-db, it's just a bunch of headers and libs,
Really!  I think Larry Ellison would disagree with you. Have you looked at
http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html (http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html)
have you looked at the version bitcoin uses?  Have you uncompressed and actually looked at what's there?  I don't see any, and I'll use your quote
Quote
it's just a bunch of headers and libs
BS, say I!  It is an interface for C/C++ and C sources for the actual database, and easy to work with VS projects, solutions and workspaces.  No libraries in sight.  And easy to build again.
Quote
Quote
it could be added directly to the project.
Why, when the spirit of the bitcoin source is to use available libraries.  You are slowing down the build process to needlessly recompile a project when the sources are best kept in an already compiled once static library.  Do you think the gcc version of bitcoin recompiles the libraries every time?

You never mentioned the main library leveldb.  Have you done that?  If anything needed its own library, that would be the one.  And how do you do all the separate tests provided by the original sources in your scenario?

Also the sources for the programs would no longer be unified, which is not what we want.  We want one set of sources using the same versions of the same libraries.
 
It seems you are just a distraction trying to stick a wrench into the wheels of progress.
Quote
Quote

 Also the QT is doable, since we use it at my work, and we just integrated the sources to our source code tree and compile it together with our files. This way, people could just download the msvc solution and it would work out of the box without the need to install anything else.
2.  I'd rather not clutter up the solution any more than it already is.  I feel funny enough having put the QR code project in there now.  I use Qt and openssl in my work as well, but I think my team mates would have a fit if I tried to put them into the solution.  Currently, I build Qt/OpenSsl and give everyone the output in a zip file.  That seems to work the best, especially since we often have to switch back and forth between Qt versions.

Absolutely. Keep all four libraries separate.  Makes for a fast bitcoin rebuild.  In case this person thinks that one can't debug into the libraries he is sorely mistaken!  Since one built them in VS, the /MTd libraries debug all the way down "to the bottom"!  Just because MingW gcc libraries are somewhat tricky to configure for building on a Windows machine doesn't mean MSVC libraries are.  Actually they are quite a bit easier thanks to MS.

Ron





Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: greyman on January 15, 2014, 08:45:10 AM

That defeats the whole spirit of the libraries.  They should be separate static library builds to allow a simple rebuild of a newer library version, e.g. OpenSSL 1.0.1e in place of 1.0.1c.  Rebuild the MSVC static library project (minutes at the most) and simply relink the bitcoin project.  Keeping versions straight without library names would seem to quickly lead to insanity, don't you think?
....

I don't say you are not correct, but what you are saying in your post (also further down) is not exactly universal experience. Maybe you are very skilled in compiling and have working experience with 3rd party open source libraries, but it's not like this for many other people. Many programmers who knows only Visual Studio will not go to the end of the process successfully...to sum it up, you are making it easier that it is (I mean for new people especially).

Also, replacing the library with newer version don't always work. (for example with QT).

In my work, we have a source tree, and all 3rd party libraries are there, so you know exactly what you are compiling. That's especially helpful when someone new comes to a team - he just download the tree and compiles it from the root, and don't have to fiddle with installing this and installing that. And it doesn't take any more time during normal development, since those libs are compiled only once (the sources doesn't change). But I understand that the open source culture is different in this regard, it's more of a meritocracy. (I have better bragging rights, since I know more ;-)).

Anyway, the more important question is, how do we convince the main bitcoin developers to include visual studio support into the main development branch. ;-)


Title: Re: Ported Bitcoin 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: old c coder on January 15, 2014, 04:27:58 PM

That defeats the whole spirit of the libraries.  They should be separate static library builds to allow a simple rebuild of a newer library version, e.g. OpenSSL 1.0.1e in place of 1.0.1c.  Rebuild the MSVC static library project (minutes at the most) and simply relink the bitcoin project.  Keeping versions straight without library names would seem to quickly lead to insanity, don't you think?
....

I don't say you are not correct, but what you are saying in your post (also further down) is not exactly universal experience. Maybe you are very skilled in compiling and have working experience with 3rd party open source libraries, but it's not like this for many other people. Many programmers who knows only Visual Studio will not go to the end of the process successfully...to sum it up, you are making it easier that it is (I mean for new people especially).

Also, replacing the library with newer version don't always work. (for example with QT).

In my work, we have a source tree, and all 3rd party libraries are there, so you know exactly what you are compiling. That's especially helpful when someone new comes to a team - he just download the tree and compiles it from the root, and don't have to fiddle with installing this and installing that. And it doesn't take any more time during normal development, since those libs are compiled only once (the sources doesn't change). But I understand that the open source culture is different in this regard, it's more of a meritocracy. (I have better bragging rights, since I know more ;-)).

Anyway, the more important question is, how do we convince the main bitcoin developers to include visual studio support into the main development branch. ;-)

Hello greyman,

I see no problem with separate Github projects for building the static libraries for the four libraries in question.  But it should not be part of the bitcoin project on GitHub.  This is because those libraries were not created for bitcoin per se, they are for many projects.  Also, the build of a static (or dynamic) library may be (?) specific to the version of MSVC++ one is using!  At least the guides for building them at BerkeleyDB, Boost and OpenSSL seem to think so!  You cannot force someone to use a particular version of MSVC++ unless you have hired him (or her) and even then you may get flak ;D

As to separate GitHub projects, Phelix did something like that for gcc, see
https://github.com/phelixbtc/bitcoin/tree/0.8.5-EWB (https://github.com/phelixbtc/bitcoin/tree/0.8.5-EWB) and the (now modified) original work by nitrogenetics
https://bitcointalk.org/index.php?topic=149479.msg1587734#msg1587734 (https://bitcointalk.org/index.php?topic=149479.msg1587734#msg1587734)
I think there is a GitHub of that too.

I think a better solution would be to do videos for each of the four! Sort of like a walk-through for a video game ;D  Furthermore, a video would show the principles for MSVC "static librarying" independent  of VC version!

Today's Zen calendar is very appropriate:
http://lostabout.com/btc/proust2.jpg

I know we have dumbed down the educational system, but must we do it to software development too?

Just my $0.02

Ron





Title: BitCoin-QT -- VS2013 - Compile Warnings
Post by: JDS on January 28, 2014, 09:39:40 PM
Hi All,

Has anyone found a way to resolve the many VS2013 Compiler warnings?

Examples:


Warning   88   The 'YieldDuringToolExecution' attribute is not declared.   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets   843   9   Miscellaneous Files


Warning   12   The element 'ClCompile' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'PrecompiledHeaderOutputFile' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'PrecompiledHeader, AdditionalIncludeDirectories, AdditionalUsingDirectories, CompileAsManaged, ErrorReporting, WarningLevel, MinimalRebuild, DebugInformationFormat, PreprocessorDefinitions, Optimization, BasicRuntimeChecks, RuntimeLibrary, FunctionLevelLinking, FloatingPointModel, IntrinsicFunctions, PrecompiledHeaderFile, MultiProcessorCompilation, UseUnicodeForAssemblerListing, UndefinePreprocessorDefinitions, StringPooling, BrowseInformation, FloatingPointExceptions, CreateHotpatchableImage, RuntimeTypeInfo, OpenMPSupport, CallingConvention, DisableSpecificWarnings, ForcedIncludeFiles, ForcedUsingFiles, ShowIncludes, UseFullPaths, OmitDefaultLibName, TreatSpecificWarningsAsErrors' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets   215   10   Miscellaneous Files


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on February 07, 2014, 03:49:22 AM
Sorry, I cannot help with VS 2013.

I created an Ubuntu 12.04 64-bit virtual machine and built the Qt application from my latest source (as of today) and ran for a while to make sure that it downloaded blocks without errors.  I used the .pro file from the github 0.8.6 branch, which required a slight tweak to compile with Qt 5.1...I know it's not an exhaustive test but I tried :)

Also, the first post has been updated with new information and a link to my new codeplex project for a port of Litecoin source.


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: TechAUmNu on February 15, 2014, 03:06:32 PM
Hi Clare,

I have spent a while setting up everything and managed to compile everything apart from litecoinQt which fails with this error

Code:
'..\..\..\bitcoindeps\qt-everywhere-opensource-src-5.1.1\qtbase\bin\lrelease.exe' is not recognized as an internal or external command,

I have spent a while trying to figure out why lrealease isn't being built, since the folder is there and it all looks ok.
All of the dependencies seem to compile just fine, so I am confused what is going on.

Any ideas?

Edit: Got it to work by building qt 4.8.5 using mingw and then copying lrelease in the bin folder of qt 5.1.1

Thank you Clare123 for the awesome port!


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: old c coder on February 16, 2014, 02:56:18 AM
Hi Claire and other C++ experts,

Well, bitcointalk.org blew up taking the first version of this message into
oblivion, so I am reconstructing it as best I can.  I keep forgetting not to
compose in the window provided:(

Anyway, I downloaded the bitcoinqtmsvc2012-32138.zip version of 0.8.6
from codeplex, and my VC++ compiler has some "issues" with the  language in
regards the vector, among other things.

Looking at
http://msdn.microsoft.com/en-us/library/k449z507%28v=vs.80%29.aspx (http://msdn.microsoft.com/en-us/library/k449z507%28v=vs.80%29.aspx)
for 2005 and
http://msdn.microsoft.com/en-us/library/9xd04bzs%28v=vs.110%29.aspx (http://msdn.microsoft.com/en-us/library/9xd04bzs%28v=vs.110%29.aspx)
for 2012,

notice that the data() method of vector does exist in 2005. 
Nor in 2008, it only "appeared" in 2010 and later versions!  So if one chooses
to not use &vch[0] and can't use vch.data(), could one use
&vch.at(0) or &(*vch.begin())?  Of course, one reads that
"unspecified" behavior results if there isn't (enough) data there!?  This
makes one wonder about the EvalScript() function is script.cpp

Also in serialize.h, an insert(..) method of CDataStream:
Code:
#ifndef _MSC_VER
    void insert(iterator it, std::vector<char>::const_iterator first,
                                    std::vector<char>::const_iterator last)
    {
        assert(last - first >= 0);
        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
        {
            // special case for inserting at the front when there's room
            nReadPos -= (last - first);
            memcpy(&vch[nReadPos], &first[0], last - first);
        }
        else
            vch.insert(it, first, last);
    }
#endif
that you "removed" from VC++ 2012's view, happens to be the one that VC++ 2005
want's to use!  If I leave it as is, I get:
Code:
Compiling...
main.cpp
...\src\wallet.h(864) : error C2664:
'void CDataStream::insert(CDataStream::iterator,CDataStream::size_type,const char &)' :
cannot convert parameter 2 from 'std::_Vector_const_iterator<_Ty,_Alloc>' to
'CDataStream::size_type'
        with
        [
            _Ty=char,
            _Alloc=std::allocator<char>
        ]
        No user-defined-conversion operator available that can perform this conversion,
or the operator cannot be called

Build Time 0:08
Build log was saved at "file://...\Release\BuildLog.htm"
Bitcoin086CduS - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Finally, in main.cpp, the
std::set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
// may contain all CBlockIndex*'s that have validness >=BLOCK_VALID_TRANSACTIONS,
// and must contain those who aren't failed


compiles the same whether it is std::set<.. or ::set<.. or
set<.. for me. But since, in release mode, some arcane switches are different,
and the set has its erase() method called,  I get the compiler error:
Code:
Compiling...
main.cpp
D:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(1174) : error C3848:
expression having type 'const CBlockIndexWorkComparator' would lose some
const-volatile qualifiers in order to call 'bool CBlockIndexWorkComparator::operator ()
(CBlockIndex *,CBlockIndex *)'
        D:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(1169) :
        while compiling class template member function 'std::_Tree_nod<_Traits>::_Node
        *std::_Tree<_Traits>::_Lbound(CBlockIndex *const &) const'
        with
        [
            _Traits=std::_Tset_traits<CBlockIndex *,CBlockIndexWorkComparator,
                                                    std::allocator<CBlockIndex *>,false>
        ]
        D:\Program Files\Microsoft Visual Studio 8\VC\include\set(69) :
        see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
        with
        [
            _Traits=std::_Tset_traits<CBlockIndex *,CBlockIndexWorkComparator,
                                                    std::allocator<CBlockIndex *>,false>
        ]
        .\src\main.cpp(59) : see reference to class template instantiation 'std::set<_Kty,_Pr>'
        being compiled
        with
        [
            _Kty=CBlockIndex *,
            _Pr=CBlockIndexWorkComparator
        ]
Build Time 0:15
Build log was saved at "file://...\Release\BuildLog.htm"
Bitcoin086CduS - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

A cure i have is to change CBlockIndexWorkComparator in main.h to:
Code:
struct CBlockIndexWorkComparator
{
#ifdef _MSC_VER
    bool operator()(CBlockIndex *pa, CBlockIndex *pb) const
#else
    bool operator()(CBlockIndex *pa, CBlockIndex *pb)
#endif
    {
        if (pa->nChainWork > pb->nChainWork) return false;
        if (pa->nChainWork < pb->nChainWork) return true;

        if (pa->GetBlockHash() < pb->GetBlockHash()) return false;
        if (pa->GetBlockHash() > pb->GetBlockHash()) return true;

        return false; // identical blocks
    }
};

I can finally compile a release version without errors!  I don't know if
this is "kosher", but it looks OK to me?  Any comments?

Does anyone else have similar experiences?

In the words of Blaise Pascal:
I would have written a shorter letter, but I did not have the time.
Provincial Letters: Letter XVI, 4 December, 1656.

Ron


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on February 16, 2014, 04:48:34 PM
Got it to work by building qt 4.8.5 using mingw and then copying lrelease in the bin folder of qt 5.1.1

Hi TechAU, I'm glad you got it working :)  For future reference and for others reading this, if you have the prerequisites installed, like Active-Perl and MSVC 12, then the batch files I wrote should build all of Qt, including lrelease:

https://bitcoinqtmsvc2012.codeplex.com/SourceControl/latest#MSVC/BuildHelpers/

This directory holds all the batch files.  You can look at buildqt32.bat to see what it's doing.  Note that the batch file does need to be edited for your directory locations and to update the configure line for your build location of OpenSsl.  Don't forget that part because if it starts building and can't find openssl, then you will have to start over with a clean copy of the qt distribution--at least I have to start over.

But if you are using some other build of Qt and don't want to deal with the translations, you can just delete the TS files from the project.  They aren't required unless you want to see the different languages.


Hi Claire and other C++ experts

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...:)



Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: old c coder on February 16, 2014, 08:59:48 PM
...
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...:)


Hi Claire,

Release mode working?  ::)  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.

The (first) actual error happens in the file ...Program Files\Microsoft Visual Studio 8\VC\include\vector in the
Code:
template<class _Ty, class _Ax> class vector
at the
Code:
reference operator[](size_type _Pos)
{ // subscript mutable sequence
                  ...

operator, when the [argument] is >= size of the vector.  But even if one disables that check, the next one hits anyway!  Which is
Code:
            _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
So I have to disable that one too!  Now I can actually run in debug mode.  But as I have said, after some time, usually an hour or two, the code DEBUG_LOCKCONTENTIONs somewhere in the RPC thread(s).  The hint is that the bitcoind code can no longer respond to RPC commands, other than help & stop (maybe other simple ones?).

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. :)  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?

And finally, which "the C++ Programming Language" are you referring to? We have:
First edition    1986,  328 pages
Second edition   1991,  669 pages
Third edition    1997,  962 pages
Fourth edition   2013, 1366 pages


I find them to be over-endowed with forward references, which makes it nearly impossible to learn from.  A logician would say there seems to be some circular definitions going on here.  No wonder compiler writers don't agree on what is or should be in many areas.  Be that as it may, what version of C++, be it C++99, C++2003, C++11 do you think the majority of bitcoin is written in?  It would help, I think, if we knew!

Another one of those short letters :)

Ron


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: dbbit on February 28, 2014, 02:50:13 PM
What is missing from these instructions is that it requires perl, python and nasm to be installed, and paths to be set up to it.


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on February 28, 2014, 04:09:09 PM
What is missing from these instructions is that it requires perl and nasm to be installed, and paths to be set up to it.
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.
This readme is located here:
https://bitcoinqtmsvc2012.codeplex.com/SourceControl/latest#MSVC/BuildHelpers/README-FIRST.md

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?


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: dbbit on February 28, 2014, 04:14:59 PM
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.)



Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on February 28, 2014, 05:09:13 PM
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 :)

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!


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: dbbit on March 01, 2014, 07:16:05 PM
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?


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: dbbit on March 01, 2014, 07:41:47 PM
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.



Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on March 02, 2014, 03:42:31 PM
Thank you for finding the upnp issue! :)  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  ;D


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: dbbit on March 02, 2014, 09:06:14 PM
Thank you for finding the upnp issue! :)  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  ;D

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.


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on March 02, 2014, 09:50:00 PM
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.


Title: Re: Ported Bitcoin (and Litecoin) 0.8.6 to VS2012 (32 and 64 bit) and Qt5
Post by: Claire123 on March 03, 2014, 06:47:06 PM
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.


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on March 13, 2014, 07:53:36 PM
...
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...:)


Hi Claire,

Release mode working?  ::)  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. :)  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


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: Claire123 on March 14, 2014, 01:36:05 PM
Congratulations, Ron  ;D

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.


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: LaitMan on April 03, 2014, 05:19:34 PM
build 0.9.0 really?


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on April 03, 2014, 09:25:19 PM
 ???
build 0.9.0 really?
Is that a question?   Or a comment?  Or a ? ???

Ron


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: LaitMan on April 04, 2014, 05:30:54 AM
???
build 0.9.0 really?
Is that a question?   Or a comment?  Or a ? ???

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


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: Claire123 on April 04, 2014, 03:17:27 PM
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://bitcointalk.org/index.php?topic=555155.0

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


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on April 05, 2014, 05:34:45 PM
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://bitcointalk.org/index.php?topic=555155.0

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 ;D  Well a few "project" linker - Input - Additional Dependencies, again *coin specific, but that is for my videos :)

Ron


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: Claire123 on April 06, 2014, 02:53:56 PM
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 :)


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on April 18, 2014, 05:01:27 PM
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
http://lostabout.com/btc/live.gif
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 :o 

Well I finally solved that, so here is a late pix,
http://lostabout.com/btc/running2.gif
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 ;D

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

https://github.com/bc4-old-c-coder/bitcoin/tree/0.8.6 (https://github.com/bc4-old-c-coder/bitcoin/tree/0.8.6)
from
https://github.com/bc4-old-c-coder/bitcoin/commit/f0d221e56a12947b67b9c8f43cc5832b665052c8 (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 (https://github.com/bc4-old-c-coder/bitcoin/archive/0.8.6.zip)

Ron


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on May 10, 2014, 04:18:07 AM
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 (http://www.youtube.com/channel/UCytoaHvG3H1y9CnxZS819eQ)

The links to the sources to build bitcoind.exe 0.8.6 are given in message # 43:
https://bitcointalk.org/index.php?topic=349094.msg6284139#msg6284139 (https://bitcointalk.org/index.php?topic=349094.msg6284139#msg6284139)

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 ;D

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


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on May 16, 2014, 02:57:53 AM
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 (http://www.youtube.com/channel/UCytoaHvG3H1y9CnxZS819eQ)

The links to the sources to build bitcoind.exe 0.8.6 are given in message # 43:
https://bitcointalk.org/index.php?topic=349094.msg6284139#msg6284139 (https://bitcointalk.org/index.php?topic=349094.msg6284139#msg6284139)

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 ;D

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"  ;D  I'm just offering an alternative to the current methods.  It passes the unit test too, BTW.

Ron


Title: Re: (Now At Github) Bitcoin 0.8.6 for *VS2013* (32 and 64 bit) and Qt5.2
Post by: old c coder on June 07, 2014, 07:50:04 PM
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  :)
Hope this helps those that are "gcc desperate"  ;D  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