I have been trying to reproduce the Swing Options posted on Klaus Blog at
http://hpcquantlib.wordpress.com/2011/05/29/swing-option-i-linear-vs-dynamic-programming/ After adding those latest header files, the compiler gives out the following error message. I wonder if anybody runs into similar issues. 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: __thiscall QuantLib::FdSimpleExtOUJumpSwingEngine::FdSimpleExtOUJumpSwingEngine(class boost::shared_ptr<class QuantLib::ExtOUWithJumpsProcess> const &,class boost::shared_ptr<class QuantLib::YieldTermStructure> const &,unsigned int,unsigned int,unsigned int,class boost::shared_ptr<class std::vector<struct std::pair<double,double>,class std::allocator<struct std::pair<double,double> > > > const &,struct QuantLib::FdmSchemeDesc const &)" (??0FdSimpleExtOUJumpSwingEngine@QuantLib@@QAE@ABV?$shared_ptr@VExtOUWithJumpsProcess@QuantLib@@@boost@@ABV?$shared_ptr@VYieldTermStructure@QuantLib@@@3@IIIABV?$shared_ptr@V?$vector@U?$pair@NN@std@@V?$allocator@U?$pair@NN@std@@@2@@std@@@3@ABUFdmSchemeDesc@1@@Z) referenced in function "public: void __thiscall `anonymous namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol _glp_delete_prob referenced in function "public: void __thiscall `anonymous namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) ...... 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: __thiscall QuantLib::ExtOUWithJumpsProcess::ExtOUWithJumpsProcess(class boost::shared_ptr<class QuantLib::ExtendedOrnsteinUhlenbeckProcess> const &,double,double,double,double)" (??0ExtOUWithJumpsProcess@QuantLib@@QAE@ABV?$shared_ptr@VExtendedOrnsteinUhlenbeckProcess@QuantLib@@@boost@@NNNN@Z) referenced in function "public: void __thiscall `anonymous namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: __thiscall QuantLib::SwingExercise::SwingExercise(class std::vector<class QuantLib::Date,class std::allocator<class QuantLib::Date> > const &,class std::vector<unsigned int,class std::allocator<unsigned int> > const &)" (??0SwingExercise@QuantLib@@QAE@ABV?$vector@VDate@QuantLib@@V?$allocator@VDate@QuantLib@@@std@@@std@@ABV?$vector@IV?$allocator@I@std@@@3@@Z) referenced in function "public: void __thiscall `anonymous namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) |
Really need some help here and many many thanks~!
|
In reply to this post by Dennis Zhang
Hi
>From the error message I'd guess that a few newer files are missing in your QL version. You have to download the latest version from the SVN trunk to get this code running. There are several header and cpp files that are new/have changed since the 1.1 release. regards Klaus On Thursday 01 September 2011 05:34:12 Dennis Zhang wrote: > I have been trying to reproduce the Swing Options posted on Klaus Blog at > > http://hpcquantlib.wordpress.com/2011/05/29/swing-option-i-linear-vs-dynami >c-programming/ > http://hpcquantlib.wordpress.com/2011/05/29/swing-option-i-linear-vs-dynami >c-programming/ > > After adding those latest header files, the compiler gives out the > following error message. I wonder if anybody runs into similar issues. > > 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: > __thiscall > QuantLib::FdSimpleExtOUJumpSwingEngine::FdSimpleExtOUJumpSwingEngine(class > boost::shared_ptr<class QuantLib::ExtOUWithJumpsProcess> const &,class > boost::shared_ptr<class QuantLib::YieldTermStructure> const &,unsigned > int,unsigned int,unsigned int,class boost::shared_ptr<class > std::vector<struct std::pair<double,double>,class std::allocator<struct > std::pair<double,double> > > > const &,struct QuantLib::FdmSchemeDesc const > &)" > (??0FdSimpleExtOUJumpSwingEngine@QuantLib@@QAE@ABV?$shared_ptr@VExtOUWithJu >mpsProcess@QuantLib@@@boost@@ABV?$shared_ptr@VYieldTermStructure@QuantLib@@@ >3@IIIABV?$shared_ptr@V?$vector@U?$pair@NN@std@@V?$allocator@U?$pair@NN@std@@ >@2@@std@@@3@ABUFdmSchemeDesc@1@@Z) referenced in function "public: void > __thiscall `anonymous > namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) > 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol > _glp_delete_prob referenced in function "public: void __thiscall `anonymous > namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) > ...... > 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: > __thiscall QuantLib::ExtOUWithJumpsProcess::ExtOUWithJumpsProcess(class > boost::shared_ptr<class QuantLib::ExtendedOrnsteinUhlenbeckProcess> const > &,double,double,double,double)" > (??0ExtOUWithJumpsProcess@QuantLib@@QAE@ABV?$shared_ptr@VExtendedOrnsteinUh >lenbeckProcess@QuantLib@@@boost@@NNNN@Z) referenced in function "public: > void __thiscall `anonymous > namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) > 1>SwingOptionTest1.obj : error LNK2019: unresolved external symbol "public: > __thiscall QuantLib::SwingExercise::SwingExercise(class std::vector<class > QuantLib::Date,class std::allocator<class QuantLib::Date> > const &,class > std::vector<unsigned int,class std::allocator<unsigned int> > const &)" > (??0SwingExercise@QuantLib@@QAE@ABV?$vector@VDate@QuantLib@@V?$allocator@VD >ate@QuantLib@@@std@@@std@@ABV?$vector@IV?$allocator@I@std@@@3@@Z) referenced > in function "public: void __thiscall `anonymous > namespace'::Worker::operator()(void)" (??RWorker@?A0x1ea30ad1@@QAEXXZ) ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Thanks for your advice. I have downloaded the SVN TRUNK and rebuild the project. This time I got less error messages, which are related to "unresolved external symbol". any ideas why? sorry for keeping bothering you with this. Thanks~!
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_create_prob 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_prob_name 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_obj_dir 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_add_rows .........
|
Hi
This program also needs a linear programming optimiser (in particular the GNU Linear Programming Toolkit, GLPK), which you have to download and to add to your linker parameters. (In addition the R, RCPP and RInside libs are needed). regards Klaus On Friday 02 September 2011 07:21:51 Dennis Zhang wrote: > Thanks for your advice. I have downloaded the SVN TRUNK and rebuild the > project. This time I got less error messages, which are related to > "unresolved external symbol". any ideas why? sorry for keeping bothering > you with this. Thanks~! > > 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol > _glp_create_prob > 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol > _glp_set_prob_name > 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol > _glp_set_obj_dir > 1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol > _glp_add_rows > ......... > ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Currently, I am using GPLK v4.34. I guess I have to update it to v4.46 as specified in the Blog post to make it run. Should I installl GNUPG first to install GPLK v4.34? Thanks!
|
Klaus,
Thanks for the reply and I think it is the configuration problem. I am currently struggling with it. There are two places where it could possibly generate the problem. 1. The gplk v4.34 used is installed through the installer at the link below. It is installed at C:\Program Files (x86)\GNUWin32\ Will there be any difference between this Window version and the x.x.tar.gz? http://gnuwin32.sourceforge.net/packages/glpk.htm 2. In the Swing Option VC project (in VC 2008), I have include both C:\Program Files (x86)\GNUWin32\ for C++ and C:\Program Files (x86)\GNUWin32\lib\ for Linker (similar to how to include QuantLib in VC project). Is this the right way of doing so? Any idea/suggestion is appreciated....I really like to make it run ...... Thanks, Dennis
|
Free forum by Nabble | Edit this page |