473,320 Members | 1,863 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,320 software developers and data experts.

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\myModule.lib and object
c:\mypath\myModule.exp
Class1.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
Class2.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDbgReportW referenced in function "public: void __thiscall
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1>::_Compat(class
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1const &)const "
(?_Compat@?$_Const_iterator@$00@?$list@PAVMCQueue@ MsgConnect@@V?$allocator@PAVMCQueue@MsgConnect@@@s td@@@std@@QBEXABV123@@Z)
Class4.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
Class5.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
Class6.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
c:\mypath\myModule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\BuildLog.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 12290

"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\myModule.lib and object
c:\mypath\myModule.exp
Class1.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class2.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDbgReportW referenced in function "public: void __thiscall
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1>::_Compat(class
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1const &)const "
(?_Compat@?$_Const_iterator@$00@?$list@PAVMCQueue@ MsgConnect@@V?$allocator@PAVMCQueue@MsgConnect@@@s td@@@std@@QBEXABV123@@Z)
Class4.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class5.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class6.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
c:\mypath\myModule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\BuildLog.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\myModule.lib and object
c:\mypath\myModule.exp
Class1.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class2.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class3.obj : error LNK2019: unresolved external symbol
__imp___CrtDbgReportW referenced in function "public: void __thiscall
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1>::_Compat(class
std::list<class MsgConnect::MCQueue *,class std::allocator<class
MsgConnect::MCQueue *::_Const_iterator<1const &)const "
(?_Compat@?$_Const_iterator@$00@?$list@PAVMCQueu e@MsgConnect@@V?$allocator@PAVMCQueue@MsgConnect@@ @std@@@std@@QBEXABV123@@Z)
Class4.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class5.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
Class6.obj : error LNK2001: unresolved external symbol
__imp___CrtDbgReportW
c:\mypath\myModule.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\mypath\BuildLog.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
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...
3
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...
3
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...
1
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...
4
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...
4
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...
6
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++...
3
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...
6
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.