Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

lbcmt.lib reports missing std::exception in VS 2005 prof.

Question posted by: Darko Miletic (Guest) on March 13th, 2007 09:55 PM
Recently I wrote a dll in c++ and to simplify the distribution I decided
to link with multithreaded static library (/MT or /MTd option). In debug
everything works fine but in release I get this:

parseMetadata.obj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ)
2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(void)"
(??0exception@std@@QAE@XZ)
2>parseMetadata.obj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception::exception(char const * const &)"
(??0exception@std@@QAE@ABQBD@Z)
2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(char const * const &)"
(??0exception@std@@QAE@ABQBD@Z)
2>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(char const * const &)"
(??0exception@std@@QAE@ABQBD@Z)
2>parseMetadata.obj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception::exception(class std::exception const &)"
(??0exception@std@@QAE@ABV01@@Z)
2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(class std::exception const
&)" (??0exception@std@@QAE@ABV01@@Z)
2>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(class std::exception const
&)" (??0exception@std@@QAE@ABV01@@Z)
2>parseMetadata.obj : error LNK2001: unresolved external symbol "public:
virtual __thiscall std::exception::~exception(void)"
(??1exception@std@@UAE@XZ)
2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol
"public: virtual __thiscall std::exception::~exception(void)"
(??1exception@std@@UAE@XZ)
2>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol
"public: virtual __thiscall std::exception::~exception(void)"
(??1exception@std@@UAE@XZ)
2>parseMetadata.obj : error LNK2001: unresolved external symbol "public:
virtual char const * __thiscall std::exception::what(void)const "
(?what@exception@std@@UBEPBDXZ)
2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol
"public: virtual char const * __thiscall std::exception::what(void)const
" (?what@exception@std@@UBEPBDXZ)
2>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol
"public: virtual char const * __thiscall std::exception::what(void)const
" (?what@exception@std@@UBEPBDXZ)

This does not make much sense to me? Is that a bug? Do I need service
pack or something else?
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Carl Daniel [VC++ MVP]'s Avatar
Carl Daniel [VC++ MVP]
Guest
n/a Posts
March 14th, 2007
05:35 AM
#2

Re: lbcmt.lib reports missing std::exception in VS 2005 prof.
"Darko Miletic" <darko.miletic@globant.comwrote in message
news:%23CkmhibZHHA.4000@TK2MSFTNGP02.phx.gbl...
Quote:
Originally Posted by
Recently I wrote a dll in c++ and to simplify the distribution I decided
to link with multithreaded static library (/MT or /MTd option). In debug
everything works fine but in release I get this:


[errors snipped]
Quote:
Originally Posted by
This does not make much sense to me? Is that a bug? Do I need service pack
or something else?


It sounds like the C++ runtime library (libcpmt.lib) wasn't linked for some
reason. Another possibility is that you have multiple versions of VC++
installed, and the linker is linking the wrong library.

You could try adding /verbose to your linker options to see exactly what's
going on in either case.

-cd



Darko Miletic's Avatar
Darko Miletic
Guest
n/a Posts
March 14th, 2007
01:35 PM
#3

Re: lbcmt.lib reports missing std::exception in VS 2005 prof.
Carl Daniel [VC++ MVP] wrote:
Quote:
Originally Posted by
It sounds like the C++ runtime library (libcpmt.lib) wasn't linked for some
reason. Another possibility is that you have multiple versions of VC++
installed, and the linker is linking the wrong library.


You where right. I did have multiple versions of libcpmt.lib and
compiler used the wrong one. Thank you for your help :)

Darko

 
Not the answer you were looking for? Post your question . . .
173,562 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors