Missing reference to Bond::dayCounter() method

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing reference to Bond::dayCounter() method

Mirko Raso
Hi,
    after defining my bond, later on  my code I need to access to  the dayCounter used by the bond itself.
    So, I  tried to use the Bond::dayCounter()  method but during the linking phase  I get the following error:

dllwrap.exe --output-def libQLCBO.def --driver-name c++ --implib libQLCBO.a xlw/excel32.o xlw/Win32StreamBuf.o xlw/XlfAbstractCmdDesc.o xlw/XlfArgDesc.o xlw/XlfArgDescList.o xlw/XlfCmdDesc.o xlw/XlfExcel.o xlw/XlfException.o xlw/XlfFuncDesc.o xlw/XlfOper.o xlw/XlfRef.o CDO.o qlCBOeval.o xlAutoOpen.o qlxl/qlxlfoper.o Random/HepRandomEngine.o Random/MTRandom.o Random/MTwistEngine.o qlDefProbEval.o DefProb.o extql/daycounters.o qlUtility.o LoadData.o  -L"C:/Programmi/Dev-Cpp/lib" -L"C:/Programmi/QuantLib/lib" -L"C:/Programmi/boost/lib/*.lib" --no-export-all-symbols --add-stdcall-alias ../../../../Programmi/QuantLib/lib/libQuantLib.a  -s  -o QLCBO.xll
qlUtility.o(.text+0x31c4):qlUtility.cpp: undefined reference to `QuantLib::Bond::dayCounter() const'
collect2: ld returned 1 exit status
dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
dllwrap.exe: c++ exited with status 1
mingw32-make: *** [QLCBO.xll] Error 1

 [Linker error] undefined reference to `QuantLib::Bond::dayCounter() const'

Looking at the Bond Class definition I see that the implementation of the method is missing.
So, adding the following 3 lines to bond.hpp file

    inline const DayCounter& Bond::dayCounter() const {
        return dayCount_;
    }

and rebuilding the QuantLib library  I can do my job.
So, this method is really missing or I did any mistake ?
Thanks in advance,
Mirko

P.S. I'm using QuantLib 0.3.9 on win XP using dev-cpp 4.9.9.2 ide.

Reply | Threaded
Open this post in threaded view
|

Re: Missing reference to Bond::dayCounter() method

Luigi Ballabio
On Jun 17, 2005, at 1:32 PM, Mirko Raso wrote:

>      after defining my bond, later on  my code I need to access to 
> the dayCounter used by the bond itself.
>
>  Looking at the Bond Class definition I see that the implementation of
> the method is missing.
>  So, adding the following 3 lines to bond.hpp file
>
>     inline const DayCounter& Bond::dayCounter() const {
>          return dayCount_;
>      }
>
>  and rebuilding the QuantLib library  I can do my job.
>  So, this method is really missing or I did any mistake ?

Mirko,
        it is missing indeed---our mistake. I'll fix it before next release.

Grazie,
        Luigi