473,756 Members | 8,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.o bj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception: :exception(void )" (??0exception@s td@@QAE@XZ)
2>libcpmt.lib(s tring.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception: :exception(void )"
(??0exception@s td@@QAE@XZ)
2>parseMetadata .obj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception: :exception(char const * const &)"
(??0exception@s td@@QAE@ABQBD@Z )
2>libcpmt.lib(s tring.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception: :exception(char const * const &)"
(??0exception@s td@@QAE@ABQBD@Z )
2>libcpmt.lib(l ocale0.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception: :exception(char const * const &)"
(??0exception@s td@@QAE@ABQBD@Z )
2>parseMetadata .obj : error LNK2001: unresolved external symbol "public:
__thiscall std::exception: :exception(clas s std::exception const &)"
(??0exception@s td@@QAE@ABV01@@ Z)
2>libcpmt.lib(s tring.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception: :exception(clas s std::exception const
&)" (??0exception@s td@@QAE@ABV01@@ Z)
2>libcpmt.lib(l ocale0.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception: :exception(clas s std::exception const
&)" (??0exception@s td@@QAE@ABV01@@ Z)
2>parseMetadata .obj : error LNK2001: unresolved external symbol "public:
virtual __thiscall std::exception: :~exception(voi d)"
(??1exception@s td@@UAE@XZ)
2>libcpmt.lib(s tring.obj) : error LNK2001: unresolved external symbol
"public: virtual __thiscall std::exception: :~exception(voi d)"
(??1exception@s td@@UAE@XZ)
2>libcpmt.lib(l ocale0.obj) : error LNK2001: unresolved external symbol
"public: virtual __thiscall std::exception: :~exception(voi d)"
(??1exception@s td@@UAE@XZ)
2>parseMetadata .obj : error LNK2001: unresolved external symbol "public:
virtual char const * __thiscall std::exception: :what(void)cons t "
(?what@exceptio n@std@@UBEPBDXZ )
2>libcpmt.lib(s tring.obj) : error LNK2001: unresolved external symbol
"public: virtual char const * __thiscall std::exception: :what(void)cons t
" (?what@exceptio n@std@@UBEPBDXZ )
2>libcpmt.lib(l ocale0.obj) : error LNK2001: unresolved external symbol
"public: virtual char const * __thiscall std::exception: :what(void)cons t
" (?what@exceptio n@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 6992
"Darko Miletic" <da***********@ globant.comwrot e in message
news:%2******** ********@TK2MSF TNGP02.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
11036
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 the following code: class CFENException : public std::exception { std::string _what; public:
4
8083
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 std::exception { public:
3
3502
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? Is this because there could be an exception thrown when the code creates a std::exception? I would assume that is not the case. However, if I want to create a new exception class, derived from std::exception (say MyException) then how can I...
2
4558
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 question: If I threw all seven exceptions highlighted above. std::exception is the only exception needed within the catch clause? In other words I wouldn't need a 'catch all'? So now: void my_test()
3
2321
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 don't understand why they do so and want to fix this feature (most of the time, I go to edit source), even in their docs they write like this: try { // Close the database db.close(0); // DbException is not subclassed from std::exception, so //...
4
6409
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 want to use std::string to do that so that I don't have to deal with all the hustle of dealing with char *'s but as listed in the page (see link) below, it is not advisable to use std::string in my exception classes. The rational given is not...
3
7726
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 std::bad_alloc exception if memory could not be allocated. I have never handled the bad_alloc, so, what I expect here is a stack trace from windows showing the excact location where the exception was thrown. But, to my surprise it gives only the windows ...
5
6537
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 impression that std::exception declares what() as a virtual method, so I'm at a loss as to why the subclass's what() is not being called. For example, for this program: #include <exception>
3
6435
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. I am not satisfied with the underlying machinery of the solution though. I am an advanced C programmer and most do object-based programming in C++. Please do not reply to this article with references to basic material or obvious tips. An...
0
9456
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10040
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.