Posted by
Eric Ehlers-2 on
URL: http://quantlib.414.s1.nabble.com/Linking-Error-for-ObjectHandler-tp7574p7577.html
Hi Mark,
Quoting Mark Schuler <
[hidden email]>:
> This is what I tried exactly. I tried really really hard. I mean, I
> got everything working so far, but not this project. I get
>
>
> 1>LINK : warning LNK4098: Standardbibliothek "MSVCRTD" steht in
> Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden.
When I google on that warning, the first hit takes me to the explanation:
http://msdn.microsoft.com/en-us/library/6wtdswk0(VS.80).aspxYou need to use the same run time library for all of the projects that
you are linking together. For more info please see also:
http://quantlib.org/objecthandler/conventions.html
> 1>QuantlibObjectHandlerTesting.obj : error LNK2019: Verweis auf
> nicht aufgelöstes externes Symbol ""public: virtual __thiscall
> ObjectHandler::Repository::~Repository(void)"
> (??1Repository@ObjectHandler@@UAE@XZ)" in Funktion "_wmain".
> 1>QuantlibObjectHandlerTesting.obj : error LNK2019: Verweis auf
> nicht aufgelöstes externes Symbol ""public: __thiscall
> ObjectHandler::Repository::Repository(void)"
> (??0Repository@ObjectHandler@@QAE@XZ)" in Funktion "_wmain".
> 1>fatal error LNK1120: 2 nicht aufgelöste externe Verweise.
>
> Non resolved linking. All I do is initializi
> Sendenng a repository:
>
> ObjectHandler::Repository repository;
I'm not sure about this one. If your main() function includes the
line of code above, exactly as was done in example.cpp, that should be
OK. So it seems that the ObjectHandler static library which contains
the code for the Repository class is not being linked properly? Maybe
the fix above for LNK4098 will also resolve LNK2019 and LNK1120?
> Is there a project template somewhere which works standalone? Since
> the Example one doesn't in my
> case. I appreaciate your help.
Unfortunately not. I agree completely, the setup you are attempting
is the most natural way to use ObjectHandler in a bespoke application,
so for your case it would be more helpful to put ExampleCpp in a
separate solution rather than include it in the ObjectHandler
solution, but that has not been done.
Regards,
Eric
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users