QuantLib link error

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

QuantLib link error

letian
Hi Guys,
 
I was using version 0.3.12 and just updated to 0.8.1 with boost 1_34_1. My sdk is VC8.0 in Visual Studio 2005.
I noticed that a subdirectory "lib" was generated after building QuantLib, so I included it in the "lib" directory. There is a .lib file "QuantLib-vc80-mt-gd-0_8_1.lib" in the directory. The examples and test suites work fine. But when I'm compiling my own programs, it gives a link error:  error LNK2019: unresolved external symbol ". A typical line looks like the follows:
 
CashflowDlg.obj : error LNK2019: unresolved external symbol "public: static double __cdecl QuantLib::CashFlows::npv(class std::vector<class boost::shared_ptr<class QuantLib::CashFlow>,class std::allocator<class boost::shared_ptr<class QuantLib::CashFlow> > > const &,class QuantLib::InterestRate const &,class QuantLib::Date)" (?npv@CashFlows@QuantLib@@SANABV?$vector@V?$shared_ptr@VCashFlow@QuantLib@@@boost@@V?$allocator@V?$shared_ptr@VCashFlow@QuantLib@@@boost@@@std@@@std@@ABVInterestRate@2@VDate@2@@Z) referenced in function "public: void __thiscall CCashflowDlg::OnBnClickedCompute(void)" (?OnBnClickedCompute@CCashflowDlg@@QAEXXZ)
 
Does anyone know what happened here? Thank you very much in advance.
 
PS: I got QL from sorceforge, but some core.hpp are missing, for example, ql/core.hpp, cashflows/core.hpp. A mistake?
 
Regards,
letian
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib link error

Luigi Ballabio
On Tue, 2007-08-21 at 21:05 -0700, letian wrote:

> I was using version 0.3.12 and just updated to 0.8.1 with boost 1_34_1. My
> sdk is VC8.0 in Visual Studio 2005.
> I noticed that a subdirectory "lib" was generated after building QuantLib,
> so I included it in the "lib" directory. There is a .lib file
> "QuantLib-vc80-mt-gd-0_8_1.lib" in the directory. The examples and test
> suites work fine. But when I'm compiling my own programs, it gives a link
> error:  error LNK2019: unresolved external symbol ". A typical line looks
> like the follows:
>  
> CashflowDlg.obj : error LNK2019: unresolved external symbol "public: static
> double __cdecl QuantLib::CashFlows::npv(class std::vector<class
> boost::shared_ptr<class QuantLib::CashFlow>,class std::allocator<class
> boost::shared_ptr<class QuantLib::CashFlow> > > const &,class
> QuantLib::InterestRate const &,class QuantLib::Date)"

Hi Letian,
        the function you're missing is used in the test-suite and the examples,
so it looks like it's included in the library. Are you sure you're not
picking up some old header files and/or libraries?

Luigi


> PS: I got QL from sorceforge, but some core.hpp are missing, for example,
> ql/core.hpp, cashflows/core.hpp. A mistake?

No, they no longer exist.


--

Zawinski's Law:
Every program attempts to expand until it can read mail. Those
programs which cannot so expand are replaced by ones which can.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users