Linking problem with QL 0.3.3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Linking problem with QL 0.3.3

Niels Elken Sønderby
Hi QuantLibs!

I haven't been able to build any QuantLib program with the new release
QuantLib-0.3.3 as I get strange linking errors of the kind:
"msvcprt.lib(MSVCP60.dll) : ... already defined in QuantLib.lib(voltermstructure.
obj)" (full error messages below).

I experience the same problem on two different computers with different
installations of Microsoft Visual C++ 6.0. If I go back to QL 0.3.
1, I have no problems.

In an attempt to isolate the problem I made a new project with a
very simple program (see below), and followed the guidelines in http:
//quantlib.org/html/usage.html.

What am I doing wrong?

I really hope you can help, as would like to rewrite my code work
for the new sources.

Niels



#include <ql/quantlib.hpp>

int main()
{
    QuantLib::Array abcd(4);

    return 0;
}


Deleting intermediate files and output files for project 'QuantTest2
- Win32 Release'.
--------------------Configuration: QuantTest2 - Win32 Release----
----------------
Compiling...
QuantTest2.cpp
Linking...
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall std:
:basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::~basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>(void)" (??1?$basic_string@
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined
in QuantLib.lib(voltermstructure.obj)
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: class std::basic_string<char,
struct std::char_traits<char>,class std::allocator<char> > & __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::assign(class s
td::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
> const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)
already defined in QuantLib.lib(voltermst
ructure.obj)
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::_Tidy(bool)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z)
alread
y defined in QuantLib.lib(voltermstructure.obj)
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: bool __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE
_NI_N@Z) already defined in QuantLib.lib(voltermstructure.obj)
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::_Eos(unsigned int)" (?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z)
a
lready defined in QuantLib.lib(voltermstructure.obj)
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::_Split(void)" (?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ)
alread
y defined in QuantLib.lib(voltermstructure.obj)
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of
other libs; use /NODEFAULTLIB:library
Release/QuantTest2.exe : fatal error LNK1169: one or more multiply
defined symbols found
Error executing link.exe.

QuantTest2.exe - 7 error(s), 1 warning(s)




===================================================================
EASY and FREE access to your email anywhere: http://Mailreader.com/
===================================================================