Regarding the /Zc:threadSafeInit option, this was added later, in the
June "VS14" CTP (now VS2015 in CTP 6), so I'm leaving it as-is.
e
On 03/23/2015 01:49 PM, Eric Voskuil wrote:
> I've updated all libbitcoin repos so that there is no code in published
> headers requiring the VC++ CTP compiler (generally C++11 stuff, mostly
> constexpr).
>
> I've done the same in all test projects, which I've also changed to not
> use the CTP compiler and instead use VC++12. This provides a convenient
> means to ensure that the CTP requirement doesn't creep into the headers
> or break in another manner. It also provides an example of how to link
> to the main libraries (built with the CTP compiler) using the RTM compiler.
>
> There is a small additional runtime library that augments the CRT when
> linking with VC12. This is automatically incorporated, although I may
> try and get rid of that requirement by using " /Zc:threadSafeInit" as
> described here:
>
> http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
>
> The changes are accomplished using three new libbitcoin macros
> (BC_CONSTREXPR, BC_CONSTFUNC and BC_NOEXCEPT) so that non-MSVC builds
> are unaffected. These should be used in all published headers and tests.
>
> e
>
> On 03/19/2015 02:39 PM, Eric Voskuil wrote:
>> It may not be too difficult to remove from headers. Templates may
>> present problems beyond the use of constexpr. I'd be happy to review a
>> pull request.
>>
>> e
>>
>> On 03/19/2015 02:07 PM, Bedeho Mender wrote:
>>> Hi Eric,
>>>
>>> Ive been talking to some Qt developers, and it appears that you do
>>> indeed have to rebuild Qt with a newer MSVC version, however, it turns
>>> out that this is likely not possible with the present build system on
>>> Windows with these new versions of MSVC (for reasons was not given).
>>>
>>> How difficult would it be to have a version of libbitcoin where the CTP
>>> 2013 features were taken out, so that libbitcoin could be used with the
>>> latest full release of MSVC 2013? That is, how prevalent is the usage of
>>> C++11 features which only are implemented in the CTP? e.g. constexpr.
>>>
>>> I would be happy to sponsor this dev work depending on how involved it
>>> would be, and that would allow people to use libbitcoin with Qt - which
>>> I think a lot of people will likely want to do, given that Qt is the
>>> most popular C++ framework out there.
>>>
>>> best
>>> bedeho
>>>
>>>
>>>
>>> On 17 March 2015 at 20:52, Eric Voskuil <eric@???
>>> <mailto:eric@voskuil.org>> wrote:
>>>
>>> Ah yes, that's unfortunate. Now I remember I looked at QT a while back
>>> and determined I would need to compile QT to make it work. I decided to
>>> wait for time to resolve the issue :/
>>>
>>> e
>>>
>>> On 03/17/2015 06:27 AM, Bedeho Mender wrote:
>>> > Hi Eric, thanks for the quick response!
>>> >
>>> > It doesn't appear so to me, but perhaps I am misunderstanding the
>>> problem.
>>> >
>>> > When I make a minimal Qt project
>>> > (https://github.com/bedeho/QtLibbitcoin/blob/master/main.cpp)
>>> which uses
>>> > MSVC2013, then if I just
>>> > include the libbitcoin header #include <bitcoin/bitcoin.hpp>, then
>>> I get
>>> > lots of compile errors.
>>> >
>>> > The errors seem to be associated with certain c++11 features which
>>> > msvc2013 does
>>> > not support fully. Here is the first error I get
>>> >
>>> > C:\libbitcoin\libbitcoin\include\bitcoin/bitcoin/math/hash.hpp(31) :
>>> > error C2146: syntax error : missing ';' before identifier 'size_t'
>>> >
>>> > Which references line 31 in hash.hpp:
>>> >
>>> > constexpr size_t short_hash_size = 20;
>>> >
>>> > In this case, the problem seems to be that constexpr is a new feature
>>> > which msvc2013 does not support, from what I could understand by
>>> > reading up, and that CTP_Nov2013 was required for this reason. For
>>> > example, the release notes on this CTP explicitly mentions constexpr
>>> > support
>>> (http://www.microsoft.com/en-us/download/details.aspx?id=41151):
>>> > "constexpr (except for constructors)"
>>> >
>>> > Am I on the wrong track here? If not, getting Qt to work with CTP
>>> > is necessary to for using Libbitcon with Qt.
>>> >
>>> > bedeho
>>> >
>>> >
>>> > On 16 March 2015 at 22:48, Eric Voskuil <eric@???
>>> <mailto:eric@voskuil.org>
>>> > <mailto:eric@voskuil.org <mailto:eric@voskuil.org>>> wrote:
>>> >
>>> > You can link to the libbitcoin VC++ libs using the basic v120
>>> > compiler, they are compatible.
>>> >
>>> > e
>>> >
>>> >
>>> > > On Mar 16, 2015, at 8:58 AM, Bedeho Mender
>>> > <bedeho.mender@??? <mailto:bedeho.mender@gmail.com>
>>> <mailto:bedeho.mender@gmail.com <mailto:bedeho.mender@gmail.com>>>
>>> wrote:
>>> > >
>>> > > I have built libbitcoin with msvc using the compiler Microsoft
>>> > Visual C++ Compiler Nov 2013 CTP.
>>> > >
>>> > > I am trying to use libbitcoin with a Qt project running in
>>> > QtCreator, however it seems this is not easy to do, that is get Qt
>>> > to get with the CTP.
>>> > >
>>> > > Does anyone have any advice on this?
>>> > >
>>> > > best
>>> > > Bedeho
>>>
>>>
>>
>