![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: rhapsody lib in visual studio Topic Summary: Created On: 20-Jul-2005 08:13 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
Hello!
Does anyone know how to link a rhapsody lib with a Win32 project in vc++.NET? I include the following rhapsody libraries (apart from my own LibComponent.lib) in visual studio: MSoxfinst.lib MSomComAppl.lib MSaomanim.lib These libraries seem to work with MFC projects but not with any other kind of projects. I am receiving many link errors, an example: msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> > ![]() Appreciate an answer Anna |
|||
![]() |
|||
![]() |
|||
Hi Anna
Perhaps this is something to do with the VC++ "Runtime Library" options. I have a Win32 VC++ .NET app which had the following similar link error: (MSVCP71D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" (??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cerr.obj) The problem here was that my application was compiled with the "Multi-threaded Debug" runtime library option, but the Rhapsody libraries are built with the "Multi-threaded Debug DLL" runtime library option. So my code expected to statically link with the static VC++ standard libraries (libcmtd.lib and libcpmtd.lib), while the Rhapsody library code expects to statically link with the Visual C++ standard library DLL stubs (msvcrt.lib and msvcprt.lib.) When both sets of standard libraries were linked in, they clashed, causing the error. If you haven't already done so, you should make sure your VC++ .NET project is built with the same option (/MDd) as the Rhapsody libraries. You can set this in the Project Property dialogue, under Configuration Properties\C/C++\Code Generation. (See the enclosed screenshot.) MFC applications use /MDd by default, which is probably why you didn't see the error with MFC. I'm not sure if this alone would explain your problem: I'm still confused by the "already defined in LibComponent.lib(Default.obj)" part of your link error. (Do you have any idea why std::basic_ostream might be defined in Default.obj?) Let me know how you get on. regards, Simon
------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|||
![]() |
|||
![]() |
|||
Hi Simon!
That worked very well! I had changed the runtime libraries before , but only in rhapsody to match with the one in visual studio, but that did not work. When changing, as u suggested, in visual studio to match the library in rhapsody, rather than in the opposite direction, it worked. So thankyou very much! Much appreciated Anna |
|||
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
rhapsody lib in visual studio
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.