example linking error in Dev-C++ 4.9.9.2
Posted by Benjamin Janson on
URL: http://quantlib.414.s1.nabble.com/example-linking-error-in-Dev-C-4-9-9-2-tp3905.html
Hi,
I am a new to the QuantLib and I am not very experienced in using Dev-C++,
so I hope that is no rediculous question.
With the help of Pauls instructions in the article:
"Installing QuantLib using Dev-C++ 4.9.9.2: WORKING"
I compiled the QuantLib version 0.3.9 and 0.3.8 without any problems.
Then I tried to compile the examples (also with Pauls compiler flags) and
they compiles fine but the linker printed the following error
(AmericanOption.dev):
.... (more vtable warnings)
[Warning] duplicate section
`.rdata$_ZTVN8QuantLib16DiscretizedAssetE[vtable for
QuantLib::DiscretizedAsset]' has different size
[Linker error] undefined reference to
`QuantLib::detail::operator<<(std::ostream&,
QuantLib::detail::percent_holder const&)'
[Linker error] undefined reference to
`QuantLib::detail::operator<<(std::ostream&,
QuantLib::detail::percent_holder const&)'
....(lot more Linker errors)
When I compile it as static Library (instead of as Console Application) it
works just fine. Any ideas are appreciated.
Thanks a ton in advance.
Cheers Benjamin