Library compatibility using C with Visual C++ Express

M

mido

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.h> to <iostream> but 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
 
D

David Harmon

On 5 Dec 2006 07:42:47 -0800 in comp.lang.c++, "mido"
I think one source of the problems is that the C code relies on old
libraries. I tried changing <iostream.h> to <iostream> but 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.h> as that was always
C++ only. I predict that you will not be happy until you get away from
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top