473,725 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linkage errors in release build with VS2005

I am having linkage errors in my release build as ff:

------ Build started: Project: myModule, Configuration: Release Win32 ------
Linking...
Creating library c:\mypath\myMod ule.lib and object
c:\mypath\myMod ule.exp
Class1.obj : error LNK2001: unresolved external symbol __imp___CrtDbgR eportW
Class2.obj : error LNK2001: unresolved external symbol __imp___CrtDbgR eportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDbgR eportW referenced in function "public: void __thiscall
std::list<class MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::MCQ ueue *::_Const_itera tor<1>::_Compat (class
std::list<class MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::MCQ ueue *::_Const_itera tor<1const &)const "
(?_Compat@?$_Co nst_iterator@$0 0@?$list@PAVMCQ ueue@MsgConnect @@V?$allocator@ PAVMCQueue@MsgC onnect@@@std@@@ std@@QBEXABV123 @@Z)
Class4.obj : error LNK2001: unresolved external symbol __imp___CrtDbgR eportW
Class5.obj : error LNK2001: unresolved external symbol __imp___CrtDbgR eportW
Class6.obj : error LNK2001: unresolved external symbol __imp___CrtDbgR eportW
c:\mypath\myMod ule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\Build Log.htm"
myModule - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

If I use the CRT Debug Dll in my "C++ code generation" setting, the
errors go away - (but ofcourse, there is the warning of multiple defined
symbols) - also this is not pratical - i.e. will lead to run time
crashes, since I cannot mix Debug dll and release dlls are memory is
allocated differently between the two.

Anyione come accross this before - and whats the correct solution to this?
Mar 28 '07 #1
2 12307

"2b|!2b==?" <ro**@your.box. comwrote in message
news:6d******** *************** *******@bt.com. ..
>I am having linkage errors in my release build as ff:

------ Build started: Project: myModule, Configuration: Release
Win32 ------
Linking...
Creating library c:\mypath\myMod ule.lib and object
c:\mypath\myMod ule.exp
Class1.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgR eportW
Class2.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgR eportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDbgR eportW referenced in function "public: void __thiscall
std::list<class MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::MCQ ueue *::_Const_itera tor<1>::_Compat (class
std::list<class MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::MCQ ueue *::_Const_itera tor<1const &)const "
(?_Compat@?$_Co nst_iterator@$0 0@?$list@PAVMCQ ueue@MsgConnect @@V?$allocator@ PAVMCQueue@MsgC onnect@@@std@@@ std@@QBEXABV123 @@Z)
Class4.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgR eportW
Class5.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgR eportW
Class6.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgR eportW
c:\mypath\myMod ule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\Build Log.htm"
myModule - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

If I use the CRT Debug Dll in my "C++ code generation" setting, the errors
go away - (but ofcourse, there is the warning of multiple defined
symbols) - also this is not pratical - i.e. will lead to run time crashes,
since I cannot mix Debug dll and release dlls are memory is allocated
differently between the two.

Anyione come accross this before - and whats the correct solution to this?

One of your files (or static library) is compiled with _DEBUG defined. Make
sure you aren't linking a debug static library with your release build.
Mar 29 '07 #2


Ben Voigt wrote:
"2b|!2b==?" <ro**@your.box. comwrote in message
news:6d******** *************** *******@bt.com. ..
>>I am having linkage errors in my release build as ff:

------ Build started: Project: myModule, Configuration: Release
Win32 ------
Linking...
Creating library c:\mypath\myMod ule.lib and object
c:\mypath\myM odule.exp
Class1.obj : error LNK2001: unresolved external symbol
__imp___CrtDb gReportW
Class2.obj : error LNK2001: unresolved external symbol
__imp___CrtDb gReportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDb gReportW referenced in function "public: void __thiscall
std::list<cla ss MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::M CQueue *::_Const_itera tor<1>::_Compat (class
std::list<cla ss MsgConnect::MCQ ueue *,class std::allocator< class
MsgConnect::M CQueue *::_Const_itera tor<1const &)const "
(?_Compat@?$_ Const_iterator@ $00@?$list@PAVM CQueue@MsgConne ct@@V?$allocato r@PAVMCQueue@Ms gConnect@@@std@ @@std@@QBEXABV1 23@@Z)
Class4.obj : error LNK2001: unresolved external symbol
__imp___CrtDb gReportW
Class5.obj : error LNK2001: unresolved external symbol
__imp___CrtDb gReportW
Class6.obj : error LNK2001: unresolved external symbol
__imp___CrtDb gReportW
c:\mypath\myM odule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\Build Log.htm"
myModule - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

If I use the CRT Debug Dll in my "C++ code generation" setting, the errors
go away - (but ofcourse, there is the warning of multiple defined
symbols) - also this is not pratical - i.e. will lead to run time crashes,
since I cannot mix Debug dll and release dlls are memory is allocated
differently between the two.

Anyione come accross this before - and whats the correct solution to this?

One of your files (or static library) is compiled with _DEBUG defined. Make
sure you aren't linking a debug static library with your release build.

Thanks for that - I don't know how on earth I missed that - I still had
a _DEBUG defined in the release config :(
Mar 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4931
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are the occurrences of FilterType that may be relevant: ------- C:\sketch\sketch-0.7.12\Filter\filterobj.c: 949: PyTypeObject FilterType = {
3
4638
by: martinbriefcase | last post by:
Compiling a program using ACE + MSVC++8, got lots of errors and some are listed as below: Error 2 error C2894: templates cannot be declared to have 'C' linkage c:\program files\microsoft visual studio 8\vc\include\iosfwd 39 Error 39 error C2733: second C linkage of overloaded function 'ACE_OS::atoi' not allowed c:\tmp\ace+tao+ciao\ace_wrappers\ace\os_ns_stdlib.h 79 Error 41 error C2733: second C linkage of overloaded function
3
4374
by: walkeraj | last post by:
I'm trying to compile an open source game called IVAN , and I'm able to compile it from a makefile, but not from an IDE. I have attempted to recreate the way the makefile compiles the project as closely as possible, yet I'm getting odd linking errors. I think I've traced it to some kind of problem with the SDL libraries it uses, yet I can't explain why it will compile from the makefile and not from the IDE. I have made sure that the ide...
1
2997
by: kurt sune | last post by:
I am having trouble publishing a website for RELEASE. 1. web.config: <compilation defaultLanguage="vb" debug="false"> 2. in Configuration manager I set the configuration to Release for the website 3. in Configuration manager I set the Active solution configuration to Release
4
6250
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release version to build successfully. Unfortunately, it crashes right away when I start it. So now I need to build the debug version. Unfortunately, the compiler gives innumerable error messages of the sort shown below. The #include file referenced...
4
5271
by: Franky | last post by:
I have a cpp program that use to compile in C++6 but give a bunch of errors in VS2005 I'm wondering if I need to reference to some library. I'd appreciate any helpful suggestion Even if it's just a suggestion of where to look or something that might work.
6
9141
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++ project. I then add a class library, and add a reference to this project in the first project. When I do a release build, I see the following in the output from the DLL compile: /OUT:"C:\Documents and Settings\Andrew\My Documents\Visual Studio
3
1846
by: Russ | last post by:
I have a Web Service that was originally created with .NET VC 2003, and subsequently converted to the 2005 version. It works fine when built as a debug version, and run on the workstation it was built on. Now I want to build a release version so I can deploy it to Windows 2003 server. This project is compiled with "/clr:oldSystax". I've run into several problems and I am not sure all of the things I am discovering are related. Any help...
6
2384
by: =?Utf-8?B?SHVnaA==?= | last post by:
Hi there We are trying to build a C sharp solution in Visual Studio 2005 Professional. We have a number of other assemblies, that do not form part of the solution. Assemblies that do form part of the solution have been referenced using the Projects tab in the Add Reference dialog. Assemblies that do not form part of the solution have been added usingthe
0
9401
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...
0
9116
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
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...
0
6011
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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.