473,416 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

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

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
2 6945
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Noah Roberts | last post by:
I am having some problems with deriving the std::exception class. My compiler (g++-2.95) works with it just fine, but it does in a lot of broken cases. I have a user/developer that can't compile...
4
by: Boogie El Aceitoso | last post by:
Hi, I have an exception class for winapi errors (returns a formated error mesage, usign ::GetLastError() et al, with what()). It looks like this: class WinapiException : public...
3
by: Pierre Rouleau | last post by:
The std::exception class defined in the Standard C++ <exception> header specifies that the constructors could throw any exception becuase they do not have a throw() specification. Why is that? ...
2
by: ma740988 | last post by:
The hierachy for standard exception lists: bad_alloc, bad_cast, bad_typeid, logic_error, ios_base::failure, runtime_error and bad_exception runtime_error and logic_error has subsets. The...
3
by: __PPS__ | last post by:
Hi, I've read in documentation to different libraries that their exception classes aren't subclasses from std::exception, and a separate catch statement is required for their exceptions. Always, I...
4
by: Divick | last post by:
Hi all, I want to subclass std::exception so as to designate the type of error that I want to throw, out of my classes, and for that I need to store the messages inside the exception classes. I...
3
by: Sendil kumar | last post by:
Hi All, Problem Stetement:I have a problem in getting stack trace when I ues std::exception. In my code, I allocate virtual memory for certain kind of processing and will throw the...
5
by: Miles | last post by:
Hello all, When I subclass std::exception and throw an instance of the subclass, when I call the what() method of the caught exception, it does not call the overridden method. I'm under the...
3
by: vainstah | last post by:
Hello Guys and Galls, To start off, I have reached the solution I was looking for, but I would like comments and feedback on the solution I have reached and tips/tricks on making it more elegant....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.