Compiling error w/ VC++, STLPort
Posted by cheng tang on
URL: http://quantlib.414.s1.nabble.com/example-code-tp2090p2091.html
Hi,
I am encountering the following error while trying to compile the CVS
files. The system is Windows XP, with VC++ 6.0 and STLPort 4.5.3.
The warnings are due to template usage, and error messages are related
to namespcae scoping and standard <ctime> usage in STLPort. If anyone
has any suggestion, please let me know. Thanks!
Here are the error messages.
In Quantlib files project:
--------------------Configuration: QuantLib - Win32 OnTheEdgeDebug--------------------
Compiling...
vols.cpp
c:...\quantlib\ql\utilities\steppingiterator.hpp(65) : warning C4284: return type for 'QuantLib::Utilities::stepping_iterator<double const *>::operator ->' is 'const double *'
(ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation)
c:\...\quantlib\ql\math\matrix.hpp(331) : see reference to class template instantiation 'QuantLib::Utilities::stepping_iterator<double const *>' being compiled
c:\...\quantlib\ql\utilities\steppingiterator.hpp(65) : warning C4284: return type for 'QuantLib::Utilities::stepping_iterator<double *>::operator ->' is 'double *' (ie; not a UDT or reference to a UD
T. Will produce errors if applied using infix notation)
c:\...\quantlib\ql\math\matrix.hpp(335) : see reference to class template instantiation 'QuantLib::Utilities::stepping_iterator<double *>' being compiled
c:\...\quantlib\ql\volatilities\blackvariancesurface.hpp(52) : error C2653: 'DayCounters' : is not a class or namespace name
c:\...\quantlib\ql\volatilities\blackvariancesurface.hpp(69) : see reference to class template instantiation 'QuantLib::VolTermStructures::BlackVarianceSurface<Interpolator2D>' being compiled
c:\...\quantlib\ql\volatilities\blackvariancesurface.hpp(52) : error C2653: 'DayCounters' : is not a class or namespace name
c:\...\quantlib\ql\functions\vols.cpp(61) : see reference to class template instantiation 'QuantLib::VolTermStructures::BlackVarianceSurface<class QuantLib::Math::BilinearInterpolation<double
const *,double const *,class QuantLib::Math::Matrix> >' being compiled
Error executing cl.exe.
QuantLib_d.lib - 2 error(s), 2 warning(s)
In example projects:
--------------------Configuration: BermudanSwaption - Win32 OnTheEdgeDebug--------------------
Compiling...
BermudanSwaption.cpp
c:\program files\microsoft visual studio\vc98\include\stlport\ctime(33) : error C2039: 'clock_t' : is not a member of '`global namespace''
c:\program files\microsoft visual studio\vc98\include\stlport\ctime(33) : error C2873: 'clock_t' : symbol cannot be used in a using-declaration
c:\documents and settings\...\quantlib\ql\utilities\filteringiterator.hpp(185) : fatal error C1506: unrecoverable block scoping error
Error executing cl.exe.
BermudanSwaption.exe - 3 error(s), 0 warning(s)