Re: Cannot build/compile QuantLib VC++ 6 Workspace using Visual C++ v. 7.1.3088
Posted by
Luigi Ballabio-2 on
Jul 21, 2003; 2:09am
URL: http://quantlib.414.s1.nabble.com/Cannot-build-compile-QuantLib-VC-6-Workspace-using-Visual-C-v-7-1-3088-tp2615p2616.html
At 06:29 AM 7/19/03 -0700, David Schwartz wrote:
>I cannot compile QuantLib VC++ 6 Workspace using MS
>Visual C++ version 7.1.3088, Microsoft .Net Framework
>1.1 version 1.1.4322 under Windows XP Pro version
>2002.
>
>The first error I get is:
>
>c:\Documents and
>Settings\...\ql\Utilities\steppingiterator.hpp(113) :
>warning C4346:
>'QuantLib::Utilities::stepping_iterator<RandomAccessIterator>::difference_type'
>: dependent name is not a type
>
>Lines 109-115 of steppingiterator.hpp are:
>
>
>template<class RandomAccessIterator>
> inline
>stepping_iterator<RandomAccessIterator>::stepping_iterator(
>
> const RandomAccessIterator& it,
>stepping_iterator<RandomAccessIterator>::difference_type
>step)
> : dn_(step), it_(it) {}
>
>
>Is there something simple I am missing? Do I need to
>"set a flag or toggle?"
David,
try the following:
a) in ql/config.msvc.hpp there's a line #define CHOKES_ON_TYPENAME.
Move it at the beginning of the file, inside a conditional section which says:
#if _MSC_VER == 1200
// move inside here configs specific to VC++ 6.0
b) in steppingiterator.hpp change the arguments to the function to:
const RandomAccessIterator& it,
QL_TYPENAME stepping_iterator<RandomAccessIterator>::difference_type step
Let me know if this works,
Luigi