RE: Quantlib does not compile under the Microsof t VC++ .NET compilers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: Quantlib does not compile under the Microsof t VC++ .NET compilers

Daniele De Francesco-2
Dann,

I had the same problem and I was using .NET 2003
Not only the CVS version is perfectly compiling, but you can fix 0.3.3 quite
quickly if you are uncomfortable checking out the latest CVS version.

I fixed it by simply following what the compiler suggests: prefix with
'typename' to indicate a type.
You will have to type that in about 15 places in 4 files and that will be
it.

So either that, or just get it from CVS. In either case it works great.

-Daniele



-----Original Message-----
From: Dann Corbit [mailto:[hidden email]]
Sent: Wednesday, October 15, 2003 4:02 PM
To: [hidden email]
Subject: [Quantlib-users] Quantlib does not compile under the Microsoft VC++
.NET compilers


It fails under both Microsoft VC++ .NET and Microsoft VC++ .NET 2003.

u:\QuantLib\ql\Utilities\steppingiterator.hpp(108) : error C2061: syntax
error : identifier 'difference_type'
u:\QuantLib\ql\Utilities\steppingiterator.hpp(108) : warning C4346:
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::difference_ty
pe' : dependent name is not a type prefix with 'typename' to indicate a type
u:\QuantLib\ql\Utilities\steppingiterator.hpp(109) : error C2244:
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::__ctor' :
unable to match function definition to an existing declaration
u:\QuantLib\ql\Utilities\steppingiterator.hpp(55) : see declaration of
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::__ctor'
definition
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::stepping_iter
ator(const RandomAccessIterator &)' existing declarations
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::stepping_iter
ator(const RandomAccessIterator
&,QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::difference_t
ype)'
u:\QuantLib\ql\Utilities\steppingiterator.hpp(144) : error C2072:
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::operator`+=''
: initialization of a function
u:\QuantLib\ql\Utilities\steppingiterator.hpp(144) : error C2146: syntax
error : missing ')' before identifier 'i'
u:\QuantLib\ql\Utilities\steppingiterator.hpp(144) : error C2433:
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::operator`+=''
: 'inline' not permitted on data declarations
u:\QuantLib\ql\Utilities\steppingiterator.hpp(144) : fatal error C1903:
unable to recover from previous error(s); stopping compilation
u:\QuantLib\ql\Utilities\steppingiterator.hpp(144) : warning C4346:
'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::difference_ty
pe' : dependent name is not a type prefix with 'typename' to indicate a type

Probably, it is some difference in the implementation of the STL.