Re: ClientCppInstrumentIn Link Error with VC10

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/ClientCppInstrumentIn-Link-Error-with-VC10-tp13738p13767.html

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