|
From: Charles K. <ka...@cg...> - 2019-08-02 21:36:57
|
Update
Using Visual Studio 2019 and the precompiled libraries for Boost 1.70. I
compiled Quantlib 1.15 and built the following file:
1>QuantLib.vcxproj ->
C:\Users\kauch\Desktop\lib\QuantLib-1.15\.\lib\QuantLib--x64-mt.lib
while the compiling of the examples resulted in a linker error below
looking for a different file
LINK : fatal error LNK1104: cannot open file 'QuantLib-vc141-x64-mt.lib'
4>Done building project "EquityOption.vcxproj" -- FAILED.
ALL examples failed.
In the lib directory, there were two files that were successfully compiled:
QuantLib--x64-mt.lib
QuantLib--x64-mt-gd.lib
I renamed them both to:
QuantLib-vc141-x64-mt.lib
QuantLib-vc141-x64-mt-gd.lib
I then chose "Rebuild Solution" and all exceeded except:
2>LINK : fatal error LNK1104: cannot open file
'libboost_unit_test_framework-vc142-mt-x64-1_70.lib'
2>Done building project "testsuite.vcxproj" -- FAILED.
========== Rebuild All: 20 succeeded, 1 failed, 0 skipped ==========
Not sure how to correct that failure but it is a target issue as Visual
Studio is looking for a compiled version (vc142) compiled with VS 2019 and
I only have the precompiled 1.70 Boost compiled with VS2017 (vc141). So I
copied a version of the Boost file from Boost version 1.71_rc I had
compiled with VS 2019 and renamed them to the name of file the Linker was
looking for. Not pretty but successful.
2>Tests completed in 17 m 40 s
2>
2>
2>Test module "Master Test Suite" has passed with:
2> 765 test cases out of 765 passed
2> 1002505 assertions out of 1002505 passed
2>
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
FYI
Microsoft Docs state the following
The platform toolset consists of the C++ compiler (cl.exe) and linker
(link.exe), along with the C/C++ standard libraries. Since Visual Studio
2015, the major version of the toolset has remained at 14, which means that
projects compiled with Visual Studio 2019 or Visual Studio 2017 are
ABI-backwards-compatible with projects compiled with Visual Studio 2015.
The minor version has updated by 1 for each version since Visual Studio
2015:
Visual Studio 2015: v140
Visual Studio 2017: v141
Visual Studio 2019: v142
These toolsets support .NET Framework 4.5 and later.
The article goes on to explain how to multitarget C++ projects in VS 2019,
https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset?view=vs-2019
On Fri, Aug 2, 2019 at 11:33 AM Luigi Ballabio <lui...@gm...>
wrote:
> The library should compile out of the box with Boost 1.70 and VC++17.
> Support for VC++19 will be in next release, out shortly.
>
> As for Boost 1.71, I guess we'll fix it when the final version gets out.
> In the meantime, if you still have it, please send me the complete error
> log.
>
> Thanks,
> Luigi
>
>
> Luigi
>
>
> On Thu, Aug 1, 2019 at 2:28 AM Charles Kaucher <ka...@cg...> wrote:
>
>> I think my first mistake was compiling Boost 1_71_0_b1_rc1 before
>> looking at Quantlib to see what version was compatible.
>> What version of Boost is tested with Quantlib? 1.70? 1.69?
>>
>> My QuantLib build resulted in failure. As a first time user, I realize
>> that the errors I received when compiling QuantLib may have been
>> self-inflicted. A sample of the errors are below.
>>
>> What version of Boost should I use?
>>
>> Is there some howto that is more up to date that uses Visual Studio 2017
>> or 2019?
>>
>> Chuck
>>
>> //////////////////////////////////////////
>>
>> The most common error was C2664 for a number of headers in Boost. Here
>> is a sample as a full list would run 20 pages.
>> This occurred 33 times for arg_list.hpp.
>>
>> 1>C:\Users\xxxxx\Desktop\lib\boost_1_71_0_b1_rc1\boost_1_71_0\boost\parameter\aux_\arg_list.hpp(312,1):
>> error C2664: [
>>
>> A number (70+) of errors/message occurred for the file parameters.hpp in
>> Boot such as this
>>
>> 1>C:\Users\xxxxx\Desktop\lib\boost_1_71_0_b1_rc1\boost_1_71_0\boost\parameter\parameters.hpp(62):
>> message : EmitsErrors=boost::mp11::mp_true,
>> 1>C:\Users\xxxxx\Desktop\lib\boost_1_71_0_b1_rc1\boost_1_71_0\boost\parameter\parameters.hpp(62):
>> message : Keyword=boost::accumulators::tag::accumulator,
>> 1>C:\Users\xxxxx\Desktop\lib\boost_1_71_0_b1_rc1\boost_1_71_0\boost\parameter\parameters.hpp(62):
>> message :
>>
>>
>> Some others as a sample:
>>
>> 5>C:\Users\xxxxx\Desktop\lib\boost_1_71_0_b1_rc1\boost_1_71_0\boost\timer.hpp(21):
>> message : This header is deprecated. Use the facilities in
>> <boost/timer/timer.hpp> instead.
>> 2>autocovariances.cpp
>> 5>LINK : fatal error LNK1181: cannot open input file
>> 'C:\Users\xxxxx\Desktop\lib\QuantLib-1.15\lib\QuantLib--x64-mt.lib'
>> 5>Done building project "ConvertibleBonds.vcxproj" -- FAILED.
>> 6>------ Build started: Project: FRA, Configuration: Release x64 ------
>> 2>barrieroption.cpp
>> _______________________________________________
>> QuantLib-dev mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>>
>
|