When building my SWIG generated wrapper for Python I get the following LINK
errors: ***************** C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:e:\QuantLib\lib\win32\VisualStudio /LIBPATH:c:\Python22\libs /EXPORT:init_QuantLib build\temp.win32-2.2\Release\quantlib_wrap.obj /OUT:build\lib.win32-2.2\QuantLib\_QuantLib.pyd /IMPLIB:build\temp.win32-2.2\Release\_QuantLib.lib /subsystem:windows /machine:I386 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> >(char const *,class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV? $allocator@D@1@@Z) already defined in QuantLib.lib(analyticeuropeanengine.obj) 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(analyticeuropeanengine.obj) 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> >(class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@ Z) already defined in QuantLib.lib(analyticeuropeanengine.obj) 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> >(class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE @ABV?$allocator@D@1@@Z) already defined in QuantLib.lib(piecewiseflatforward.obj) msvcprt.lib(MSVCP60.dll) : warning LNK4006: "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> >(char const *,class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV? $allocator@D@1@@Z) already defined in QuantLib.lib(analyticeuropeanengine.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "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(analyticeuropeanengine.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "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> >(class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@ Z) already defined in QuantLib.lib(analyticeuropeanengine.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "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> >(class basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$al locator@D@1@@Z) already defined in QuantLib.lib(piecewiseflatforward.obj); second definition ignored Creating library build\temp.win32-2.2\Release\_QuantLib.lib and object build\temp.win32-2.2\Release\_QuantLib.exp LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library build\lib.win32-2.2\QuantLib\_QuantLib.pyd : fatal error LNK1169: one or more multiply defined symbols found error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1169 *************** Any ideas on what could be causing this? Andre ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. |
At 10:23 AM 4/8/03 +0200, Andre Louw wrote:
>When building my SWIG generated wrapper for Python I get the following LINK >errors: (snip) >Any ideas on what could be causing this? Nando, could it be that you changed MSVC options? (multithreaded, multithreaded dll, whatever?) Bye, Luigi |
In reply to this post by Andre Louw-2
After some further investigation I've noticed the following:
I use the command line to build Python-QuantLib for Windows, i.e "python setup.py wrap" and "install". This gives the link errors. I noticed that it uses "build\temp.win32-2.2\..." and "build\lib.win32-2.2\..." as it's output directories. Using Visual Studio and QuantLibPython.dsp to build works fine, except that it doesn't finish the distribution by copying the relevant files to Python's site-packages directory?! I noticed that it uses "build\temp.win32-2.1\..." and "build\lib.win32-2.1\..." as it's output directories. Hope this casts a bit more light onto the problem! Andre ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. |
Free forum by Nabble | Edit this page |