Pages:
Author

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

newbie
Activity: 25
Merit: 0
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?
sr. member
Activity: 322
Merit: 250
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.
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.

The (first) actual error happens in the file ...Program Files\Microsoft Visual Studio 8\VC\include\vector in the
Code:
template 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. 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?

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 Smiley

Ron
newbie
Activity: 25
Merit: 0
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 Smiley  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...Smiley

sr. member
Activity: 260
Merit: 251
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
for 2005 and
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::const_iterator first,
                                    std::vector::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
        ]
        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 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                                                    std::allocator,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                                                    std::allocator,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
newbie
Activity: 4
Merit: 0
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!
newbie
Activity: 25
Merit: 0
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 Smiley

Also, the first post has been updated with new information and a link to my new codeplex project for a port of Litecoin source.
JDS
newbie
Activity: 1
Merit: 0
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
sr. member
Activity: 260
Merit: 251

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 Grin

As to separate GitHub projects, Phelix did something like that for gcc, see
https://github.com/phelixbtc/bitcoin/tree/0.8.5-EWB and the (now modified) original work by nitrogenetics
https://bitcointalksearch.org/topic/m.1587734
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 Grin  Furthermore, a video would show the principles for MSVC "static librarying" independent  of VC version!

Today's Zen calendar is very appropriate:


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

Just my $0.02

Ron



newbie
Activity: 40
Merit: 0

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. ;-)
sr. member
Activity: 260
Merit: 251
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
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



newbie
Activity: 25
Merit: 0
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

newbie
Activity: 40
Merit: 0
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.
newbie
Activity: 25
Merit: 0
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!  Smiley

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.
newbie
Activity: 40
Merit: 0
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.
newbie
Activity: 32
Merit: 0
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.

hero member
Activity: 812
Merit: 1022
No Maps for These Territories
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!

newbie
Activity: 25
Merit: 0
I've created a github project from a fork of bitcoin.  The original post has been updated with the details.
hero member
Activity: 784
Merit: 500
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.
newbie
Activity: 25
Merit: 0
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.
Pages:
Jump to: