By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,833 Members | 2,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,833 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?
Mar 13 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Darko Miletic" <da***********@globant.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
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]
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
Mar 14 '07 #2

P: n/a
Carl Daniel [VC++ MVP] wrote:
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
Mar 14 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.