Hi,
After scratching my head around this, I will have to post the question here... I can build all libs (QL, QLXL...) under VC10, but ClientCppInstrumentIn does not compile. There is a link error which I can not manage to fix... instrument_in.obj : error LNK2019: unresolved external symbol "double __cdecl QuantLibAddinCpp::qlInstrumentNPV(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class ObjectHandler::property_t const &)" (?qlInstrumentNPV@QuantLibAddinCpp@@YANABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVproperty_t@ObjectHandler@@@Z) referenced infunction _main 4> I have tried to add the paths to the libs, but nothing seems to work. If someone has the fix to this, I will be very grateful. Regards |
Hi
I had this kind of messages when using version 1.2 of QL. I compiled the whole QL (version 1.2.1) / QLXL (version 1.2) yesterday using VC10 and boost 1.47 with no problem rgds |
Thanks for the reply.
I have replaced QL1.2.0 by QL1.2.1, the rest staying the same (boost 1.47), but nothing changes. Any differences except this? |
In reply to this post by Lapin
I'd help you, but I don't see ClientCppInstrumentIn in my library
Maybe is because I've never heard about QLXL, please provide me I link or more info so I may help. I use vs2010 with QL1.2.1, STLPort 5.2.1 and boost 1.52 win32 but your problem has very probably nothing to do with boost nor stlport. Are you building in debug or release? are you linking with /MD /MDd or else? It seems you are compiling using char instead than the default wchar_t, but I can't tell for sure, just a guess: with that much other thing shouldn't compile though. |
In reply to this post by Lapin
Hi,
I'm not familiar with QLXL, but it looks like you have to tell the linker to add the AddinCpp library (if you compiled everything, it should be inside Addins/Cpp/lib). Luigi On Tue, Nov 27, 2012 at 3:53 PM, Lapin <[hidden email]> wrote: > Hi, > > After scratching my head around this, I will have to post the question > here... > I can build all libs (QL, QLXL...) under VC10, but ClientCppInstrumentIn > does not compile. > There is a link error which I can not manage to fix... > > instrument_in.obj : error LNK2019: unresolved external symbol "double > __cdecl QuantLibAddinCpp::qlInstrumentNPV(class > std::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> > const &,class ObjectHandler::property_t const &)" > (?qlInstrumentNPV@QuantLibAddinCpp@@YANABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVproperty_t@ObjectHandler@@@Z) > referenced infunction _main > 4> > > I have tried to add the paths to the libs, but nothing seems to work. > > If someone has the fix to this, I will be very grateful. > > Regards > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/ClientCppInstrumentIn-Link-Error-with-VC10-tp13738.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Luigi,
Unfortunately this does not help. I have compiled everything (I have AddinCpp-vc100-mt-1_2_0.lib and/or AddinCpp-vc100-mt-s-1_2_0.lib) and the path in the lib path but nothing seems to work... The problem is located with the QuantLibAddinCpp name space and its related lib. I have built the simpliest example possible: #include <qlo/auto_link.hpp> #include <qlo/qladdin.hpp> #include <iostream> #include <Addins/Cpp/addincpp.hpp> using namespace QuantLibAddinCpp; int main() { QuantLibAddinCpp::initializeAddin(); } If I remove the initializeAddin() everything works fine (well it does nothing but it compiles though). If you add it, there is a link problem as if it cannot find the function definition. error LNK2001: unresolved external symbol "void __cdecl QuantLibAddinCpp::initializeAddin(void)" I have added everything taht seems needed for it to compile in the Linker: additional librairy directories C:\build_ql_1_2_0\QuantLibAddin\Addins\Cpp\lib C:\build_ql_1_2_0\QuantLibAddin\lib C:\build_ql_1_2_0\QuantLib\lib C:\build_ql_1_2_0\ObjectHandler\lib C:\build_ql_1_2_0\log4cxx\msvc\lib Thanks |
You are only adding the paths. Are you telling the linker that it
should link your program to AddinCpp-vc100-mt-1_2_0.lib? It's not just going to look for code inside everything in the paths, you have to specify the library. Luigi On Fri, Nov 30, 2012 at 5:25 PM, Lapin <[hidden email]> wrote: > Hi Luigi, > > Unfortunately this does not help. > I have compiled everything (I have AddinCpp-vc100-mt-1_2_0.lib and/or > AddinCpp-vc100-mt-s-1_2_0.lib) and the path in the lib path but nothing > seems to work... > > The problem is located with the QuantLibAddinCpp name space and its related > lib. > I have built the simpliest example possible: > > /#include <qlo/auto_link.hpp> > #include <qlo/qladdin.hpp> > #include <iostream> > #include <Addins/Cpp/addincpp.hpp> > > using namespace QuantLibAddinCpp; > > int main() > { > QuantLibAddinCpp::initializeAddin(); > } > / > > If I remove the initializeAddin() everything works fine (well it does > nothing but it compiles though). > If you add it, there is a link problem as if it cannot find the function > definition. > > *error LNK2001: unresolved external symbol "void __cdecl > QuantLibAddinCpp::initializeAddin(void)"* > > I have added everything taht seems needed for it to compile in the *Linker: > additional librairy directories* > > C:\build_ql_1_2_0\QuantLibAddin\Addins\Cpp\lib > C:\build_ql_1_2_0\QuantLibAddin\lib > C:\build_ql_1_2_0\QuantLib\lib > C:\build_ql_1_2_0\ObjectHandler\lib > C:\build_ql_1_2_0\log4cxx\msvc\lib > > Thanks > > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/ClientCppInstrumentIn-Link-Error-with-VC10-tp13738p13763.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Keep yourself connected to Go Parallel: > TUNE You got it built. Now make it sing. Tune shows you how. > http://goparallel.sourceforge.net > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Liugi,
Sorry to be a pain but specifying the lib file just triggers other link errors... AddinCpp-vc100-mt-1_2_0.lib(init.obj) : error LNK2001: unresolved external symbol "protected: static class ObjectHandler::ProcessorFactory * ObjectHandler::ProcessorFactory::instance_" (?instance_@ProcessorFactory@ObjectHandler@@1PAV12@A) blablabla and then errors in QLObject.... QuantLibObjects-vc100-mt-1_2_0.lib(serializationfactory.obj) : error LNK2001: unresolved external symbol "public: static class ObjectHandler::ProcessorFactory & __cdecl ObjectHandler::ProcessorFactory::instance(void)" (?instance@ProcessorFactory@ObjectHandler@@SAAAV12@XZ)
What I fail to see is why everything compiles well with QL, QL Addin, and QLXL but not the example for the serialization in C++. It is a bit of a shame as I want to test it (I already uses QLXL and it serialization...
Thanks 2012/11/30 Luigi Ballabio <[hidden email]> You are only adding the paths. Are you telling the linker that it ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
That's progress. You just have to add other libraries, such as the
ObjectHandler one. The project for the C++ example is probably outdated; once you get it to link, post your changes here and someone will add them to the repository. Luigi On Fri, Nov 30, 2012 at 5:44 PM, Guillaume PEALAT <[hidden email]> wrote: > Hi Liugi, > > Sorry to be a pain but specifying the lib file just triggers other link > errors... > > AddinCpp-vc100-mt-1_2_0.lib(init.obj) : error LNK2001: unresolved external > symbol "protected: static class ObjectHandler::ProcessorFactory * > ObjectHandler::ProcessorFactory::instance_" > (?instance_@ProcessorFactory@ObjectHandler@@1PAV12@A) > > blablabla and then errors in QLObject.... > > QuantLibObjects-vc100-mt-1_2_0.lib(serializationfactory.obj) : error > LNK2001: unresolved external symbol "public: static class > ObjectHandler::ProcessorFactory & __cdecl > ObjectHandler::ProcessorFactory::instance(void)" > (?instance@ProcessorFactory@ObjectHandler@@SAAAV12@XZ) > > What I fail to see is why everything compiles well with QL, QL Addin, and > QLXL but not the example for the serialization in C++. > It is a bit of a shame as I want to test it (I already uses QLXL and it > serialization... > > Thanks > > > > 2012/11/30 Luigi Ballabio <[hidden email]> >> >> You are only adding the paths. Are you telling the linker that it >> should link your program to AddinCpp-vc100-mt-1_2_0.lib? It's not >> just going to look for code inside everything in the paths, you have >> to specify the library. >> >> Luigi >> >> >> On Fri, Nov 30, 2012 at 5:25 PM, Lapin <[hidden email]> wrote: >> > Hi Luigi, >> > >> > Unfortunately this does not help. >> > I have compiled everything (I have AddinCpp-vc100-mt-1_2_0.lib and/or >> > AddinCpp-vc100-mt-s-1_2_0.lib) and the path in the lib path but nothing >> > seems to work... >> > >> > The problem is located with the QuantLibAddinCpp name space and its >> > related >> > lib. >> > I have built the simpliest example possible: >> > >> > /#include <qlo/auto_link.hpp> >> > #include <qlo/qladdin.hpp> >> > #include <iostream> >> > #include <Addins/Cpp/addincpp.hpp> >> > >> > using namespace QuantLibAddinCpp; >> > >> > int main() >> > { >> > QuantLibAddinCpp::initializeAddin(); >> > } >> > / >> > >> > If I remove the initializeAddin() everything works fine (well it does >> > nothing but it compiles though). >> > If you add it, there is a link problem as if it cannot find the function >> > definition. >> > >> > *error LNK2001: unresolved external symbol "void __cdecl >> > QuantLibAddinCpp::initializeAddin(void)"* >> > >> > I have added everything taht seems needed for it to compile in the >> > *Linker: >> > additional librairy directories* >> > >> > C:\build_ql_1_2_0\QuantLibAddin\Addins\Cpp\lib >> > C:\build_ql_1_2_0\QuantLibAddin\lib >> > C:\build_ql_1_2_0\QuantLib\lib >> > C:\build_ql_1_2_0\ObjectHandler\lib >> > C:\build_ql_1_2_0\log4cxx\msvc\lib >> > >> > Thanks >> > >> > >> > >> > >> > -- >> > View this message in context: >> > http://quantlib.10058.n7.nabble.com/ClientCppInstrumentIn-Link-Error-with-VC10-tp13738p13763.html >> > Sent from the quantlib-users mailing list archive at Nabble.com. >> > >> > >> > ------------------------------------------------------------------------------ >> > Keep yourself connected to Go Parallel: >> > TUNE You got it built. Now make it sing. Tune shows you how. >> > http://goparallel.sourceforge.net >> > _______________________________________________ >> > QuantLib-users mailing list >> > [hidden email] >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |