I checked the code out 10 days ago and built it and it worked
fine. Just recently, I updated the code base and I am getting the following error: /bin/sh ../../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../../ql -I../.. -I../.. -g -O3 -pedantic -Wall -c compoundforward.cpp rm -f .libs/compoundforward.lo c++ -DHAVE_CONFIG_H -I. -I. -I../../ql -I../.. -I../.. -g -O3 -pedantic -Wall -Wp,-MD,.deps/compoundforward.pp -c compoundforward.cpp -fPIC -DPIC compoundforward.cpp: In method `void QuantLib::TermStructures::CompoundForward::bootstrap () const': compoundforward.cpp:150: no matching function for call to `vector<Rate, allocator<Rate> >::at (Size &)' compoundforward.cpp:151: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (Size &)' compoundforward.cpp:152: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (unsigned int)' compoundforward.cpp:157: no matching function for call to `vector<Rate, allocator<Rate> >::at (Size &)' compoundforward.cpp:158: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (Size &)' compoundforward.cpp:163: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (size_t)' compoundforward.cpp:164: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (unsigned int)' compoundforward.cpp:144: warning: `double prev' might be used uninitialized in this function compoundforward.cpp: In method `void QuantLib::TermStructures::CompoundForward::validateInputs () const': compoundforward.cpp:186: no matching function for call to `vector<QuantLib::Date, allocator<QuantLib::Date> >::at (Size &)' make[3]: *** [compoundforward.lo] Error 1 make[3]: Leaving directory `/home/herronli/QuantLib/QuantLib/ql/TermStructures' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/herronli/QuantLib/QuantLib/ql' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/home/herronli/QuantLib/QuantLib/ql' make: *** [all-recursive] Error 1 Any ideas? Liam Herron _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
At 10:30 PM 4/29/02 -0400, Liam Herron wrote:
>I checked the code out 10 days ago and built it and it worked >fine. Just recently, I updated the code base and I am getting >the following error: > >compoundforward.cpp:150: no matching function for call to `vector<Rate, >allocator<Rate> >::at (Size &)' > >Any ideas? For some reason, your compiler doesn't seem to know that std::vector has a method "at". What version of gcc are you using? Bye, Luigi (note for Andre: if the indexes are known to be safe already---i.e., you already know that i is between 0 and v.size() because the for loop says so, or because you already verified the lengths somewhere else---it might be more readable to use v[i] instead of v.at(i). What do you think?) |
In reply to this post by liam_herron
I am using gcc version 2.96 I haven't upgraded my compiler
at all. Not sure why it would build successfully 10 days ago then. Liam >From: Luigi Ballabio <[hidden email]> >To: "Liam Herron" <[hidden email]>, >[hidden email] >Subject: Re: [Quantlib-users] Having build problems. >Date: Tue, 30 Apr 2002 08:58:01 +0100 > >At 10:30 PM 4/29/02 -0400, Liam Herron wrote: >>I checked the code out 10 days ago and built it and it worked >>fine. Just recently, I updated the code base and I am getting >>the following error: >> >>compoundforward.cpp:150: no matching function for call to `vector<Rate, >>allocator<Rate> >::at (Size &)' >> >>Any ideas? > >For some reason, your compiler doesn't seem to know that std::vector has a >method "at". What version of gcc are you using? > >Bye, > Luigi > >(note for Andre: if the indexes are known to be safe already---i.e., you >already know that i is between 0 and v.size() because the for loop says so, >or because you already verified the lengths somewhere else---it might be >more readable to use v[i] instead of v.at(i). What do you think?) > > _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
Hi Liam,
you wrote: >I am using gcc version 2.96 I haven't upgraded my compiler >at all. Not sure why it would build successfully 10 days >ago then. that was because the file compoundforward.cpp wasn't in QuantLib 10 days ago. I've noticed Andre replaced the v.at(i) with v[i], would you please check if it solved the problem? ciao -- Nando >>At 10:30 PM 4/29/02 -0400, Liam Herron wrote: >>>I checked the code out 10 days ago and built it and it worked >>>fine. Just recently, I updated the code base and I am getting >>>the following error: >>> >>>compoundforward.cpp:150: no matching function for call to `vector<Rate, >>>allocator<Rate> >::at (Size &)' >>> >>>Any ideas? >> >>For some reason, your compiler doesn't seem to know that std::vector has a >>method "at". What version of gcc are you using? >> >>Bye, >> Luigi >> >>(note for Andre: if the indexes are known to be safe already---i.e., you >>already know that i is between 0 and v.size() because the for loop says so, >>or because you already verified the lengths somewhere else---it might be >>more readable to use v[i] instead of v.at(i). What do you think?) |
Free forum by Nabble | Edit this page |