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.