1. Berkeley DB version 4.8.30NC
2. Boost version version 1.48.0
3. MiniUPnPC version 1.6
4. OpenSSL version 1.0.0e
^ These were all compiled with Visual Studio 2010 Professional.
5. Nokia QT version 1.1.4 was installed with mingw and vs2008 support (but toolchain missing for vs2008, must be setup manually ?).
6. Tried to open the *.pro file with QT Creator which apperently uses mingw.
7. Compile with mingw seems to work to some degree, but linking problems, I can't make sense of which libs to include, everything is a bit messy, I tried, but C/C++ programmers make a big mess out of things and Visual Studio makes it even worse, *.lib, *.whatever all over the place.
Plus:
8. Mingw has issues with spaces in filenames.
9. I tried mingw once to compile some kind of gnu tool chain, mingw failed, cygwin succeeded, since then mingw is on my banlist.
Plus:
10. I also tried simply adding the gui qt files from bitcoin to visual studio 2010 new project file, but bitcoin's source is also kinda messy... includes lot's of include folders...
Some tips:
use: (std::min) with parentheses
use: (std::max) with parentheses
^ This solves some compile problems.
use: include "QTCore\QObject.h" instead of "QObject.h" <- makes it difficult to include all folders.
11. OpenSLL seems to have a crypto library... OpenSLL seems kinda old, I am not sure if it compiled/linked/produced everything which is needed, it's weird.
12. MiniUPnP was build twice to make it work, also *.h.in was renamed to *.h to make it work.
13. Berkeley DB vcproj files were modified to cut away the IA64 platform sections as already mentioned, that makes it build properly. (Opened with textpad/external text editor to modify them manually)
Windows 7 is a little bit annoying to develop on because of worse GUI then XP and it doesn't remember settings/changes to listviews in windows explorer which is somewhat annoying, the find/search box and results same thing, but with a little getting used to it it's still workable.
Visual Studio 2010 has improved a lot in quality since previous versions, but it stills poop compared to Delphi, in many ways. So is C/C++ code still poop in many ways. C/C++ it's slow, it's big, it's old, it's unnecessary complex.
Your/this project/bitcoin is the ultimate demonstration of C/C++ fail. It's not cross platform at all, it does compile, but it doesn't link properly, it's a big mess.
QTCreator is the weirdest IDE I have ever seen ! What a weird thing... it's a newby IDE with very very very little features. I cannot imagine anybody using it for any serious development, except perhaps some make-file-freaks.
Make files suck ass big time. Source code should be able to be build by creating new projects, including files, adding libraries. All that users should need is a little manual how to put things together.
There are many things which Free Pascal/Object pascal/Delphi/Lazarus does better. Especially Delphi does many little things much better, to understand that requires having used Delphi a lot. Delphi might not come with all kinds of handy libraries but those can be found on the internet.
All these little things might seem irrelevant but they are not, it all adds up to time being wasted when using visual studio and the likes. Lot's of time being wasted, and I think even Delphi is old and slow to use in some ways and could and should have been improved a lot already over the years. C/C++ is like 0.01% of what Delphi is when it comes to development speed. Yes that's 1/100 of a procent, not even a procent.
I do recommend you give Visual Studio a looksy/try it probably has a free version somewhere as well. I am not sure if the free version has the gui designer, but maybe it has. The gui designer seems to use some kind of .net 4.0 controls. I don't like .net 4.0 and I am not sure if it requires the dot net 4.0 framework, it probably does, but it might be worth a try. It probably combines dot net 4.0 and c++.
Perhaps this is bad and not wise, so let's skip this point of critique.
Now that I have vented some of my critique I do have some questions for you or others involved with the bitcoin project, you may ignore all my critique if you wish, I don't mind, but please do try to answer my questions which would be interesting to know:
1. Why is Berkeley DB used as the" storage technology" ? Why not simply a bunch of binary streams coded by hand ? Is it perhaps because of lack of time ? Is it perhaps because berkeley db offers some robustness <- doesn't seem to be the case according to crash reports from users... ? Is it because you know berkeley well ? Is it because you got payed to use and promote berkeley ? Does berkeley have/offer some special features which bitcoin needs ? Was berkeley perhaps selected because of security/robustness or something ? Was it perhaps selected to interface with something else ? Was it perhaps selected because it's easy to program against
As you can see I wonder why Berkeley DB was used/selected.
2. What is json ?
3. Why is/was Nokia QT selected as the new gui framework ? What devices do you hope to get bitcoin running on ? Is it just for mac/os x ? Is it just for Windows ? Or perhaps symbian
Any other mobile phones ?
(I don't even have a mobile phone so I know little about that, I choose not to have a mobile phone because I think it's fun to not go along with that technology, just to see how it is the "digital-divide". Plus radiation avoidence plus many other things
)
4. I do wonder how the stock exchanges interface with the network... they probably wrote that them selfes, but perhaps you know something about it ? (This question not really that relevant and can be skipped if you wish).
5. In what state is the old gui ? Could the old gui perhaps still be used with bit coin 0.5 ? Perhaps the old gui is easier to get working ?
For now the bitcoin c/c++ project seems to be doomed from my perspective... I also worry a little bit about critical section everywhere but ok
I think the best possible course of action to try and bring some sense to the mess is to split it into an "engine" and a "gui".
The "engine" has "gui" hooks/events which get "fired", so gui's can connect to it like so:
if (mOnSomeEvent != null)
{
mOnSomeEvent( ... ); // call gui event, possibly returning something.
}
^ Perhaps these would need to be function/routine pointers in just plain C so DLL's could be made/used.
^ I know this will be difficult to do and will limit bitcoin in it's flexibility but without this I cannot add a Delphi GUI to bitcoin.
It would be lovely if I could build some Delphi GUI and connect it to bitcoin engine, then stuff can be visualized in real time.
If this cannot be made into reality then I will have to abandone my attempts at getting a bitcoin c/c++ version working.
However there might also be other options to connect other languages/technology to running bitcoin instances ?!?
I have seen this "RPC" feature ?!? I am not exactly sure what it is, but it seems to allow miner application to connect to bitcoin instance ?
Also what exactly is bitcoind ? Haven't run it yet, does it offer anything significantly over the bitcoin client ? As far as I know it's some console application/version of bitcoin ?
Perhaps bitcoind is easier to compile/build
A console application based version of bitcoin might be handy, then at least QT can be kept out.
Other possibilities to improve code quality is to prevent use of big frameworks like: openssl, boost and even berkeley to keep the code nice and small.
This could mean some custom code, or perhaps code copy & pasted with attribution to original authors.
If this were to happen then bitcoin could be compiled in one go instead of having to use libraries, which is just messy.
I can understand c/c++ programmers wanting to use frameworks to make their lifes easier/faster, but it comes at a price.
I think for a reference implementation it would be nice if bitcoin was completely self containing and didn't need any external framework
The folder structure is also very weird:
"src\src" ? Twice
What is:
"src\obj" folder ?
Anyway...
If you want to give Visual Studio 2010 another try, and need help building those libraries then I think I can help with that.
If you could make a Visual Studio 2010 project/solution file which would build bitcoin then that would be great !
For now I don't think the QT Creator thing is going to work, it would probably require a lot of mingw make files and such, perhaps those libraries have mingw make files included, perhaps it's easy to compile them from command line or batch file and invoke mingw.
But if I am going to add some source code/features to bitcoin then I need a good debugger as well, and be able to run it... I am not sure if QT creator is going to be good for that, I am not sure if it's going to run and debug and trace and all of that... seems kinda shacky.
Perhaps I might give mingw one last try tomorrow and the day after, but if it's then still not working I am calling it quits
I already spent 2 days trying to get bitcoin compiling, if this was written in Delphi I would have been done after 15 minutes, so that gives some idea of the enormous waste of time of visual studio/c/c++ and those shacky c/c++ frameworks. I will give them some slack because those are "cross-platform". But just getting it working on one platform would be nice
I think there are probably enough programmers in the world that "cross platform" libraries are not really needed, and libraries/code could be specialized per platform. None-the-less it would be nice if stuff just worked. I have not done any cross platform development or very little, though Delphi and Lazarus are becoming cross platform, doing it for consoles is easy, doing it for gui's is hard. It will be interesting to see if Delphi will evolve into an easy to use cross platform gui development environment or not
Perhaps you have a day job and have little time to work on the project ? I can understand that so I would appreciate it if you at least focus on my most important questions, for what you think is most important.
Perhaps you could also tell something more about yourself and perhaps the other programmers involved with the projects ? What kind of experience do they have
?