Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 5th, 2006, 03:25 PM
mido
Guest
 
Posts: n/a
Default Library compatibility using C with Visual C++ Express

I am currently trying to compile code which uses old C code with a C++
wrapper. It had compiled on earlier versions of software (within the
past two years), but Maya needs an updated version.
I think one source of the problems is that the C code relies on old
libraries. I tried changing <iostream.hto <iostreambut it
introduced a handful of errors in the C code which I am hoping to avoid
getting wrapped up in.

I get the following errors using Visual C++ 2005 Express Edition:

LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall
std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z)
already defined in handsimulatenode.obj
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall
std::bad_cast::bad_cast(class std::bad_cast const &)"
(??0bad_cast@std@@QAE@ABV01@@Z) already defined in handsimulatenode.obj
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall
std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already
defined in handsimulatenode.obj
LINK : fatal error LNK1104: cannot open file 'libcimtd.lib'

I am wondering if anyone else has already dealt with this problem.

Is the problem just a matter of linking to the debug library
'libcimtd.lib'? (There is no version for x86 but there is one for
AMD64, but it will take figuring out how to use it.)
Or is the root of the problem something else?

Thanks,
mido

  #2  
Old December 5th, 2006, 07:35 PM
David Harmon
Guest
 
Posts: n/a
Default Re: Library compatibility using C with Visual C++ Express

On 5 Dec 2006 07:42:47 -0800 in comp.lang.c++, "mido"
<midori.hyndman@gmail.comwrote,
Quote:
>I think one source of the problems is that the C code relies on old
>libraries. I tried changing <iostream.hto <iostreambut it
>introduced a handful of errors in the C code which I am hoping to avoid
>getting wrapped up in.
Of course actual C code cannot depend on <iostream.has that was always
C++ only. I predict that you will not be happy until you get away from
<iostream.hand on to <iostream>. If nothing else, they are so
incompatible that you cannot link them both in the same program.
Quote:
>I get the following errors using Visual C++ 2005 Express Edition:
>
>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall
>std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z)
>already defined in handsimulatenode.obj
Clutching at a straw, is there any chance that you did not recompile
handsimulatenode.cpp with the new compiler?

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles