473,888 Members | 1,594 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 12313

"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
4935
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
4645
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
4379
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
3003
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
6256
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
5278
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
9149
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
1855
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
2393
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
9959
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
9800
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
10772
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10880
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
10434
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
9593
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
5812
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
6012
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4638
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

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.