Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2007

Tip: Looking for answers? Try searching our database.

linkage errors in release build  with VS2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
2b|!2b==? - 29 Mar 2007 00:37 GMT
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<1> const &)const "
(?_Compat@?$_Const_iterator@$00@?$list@PAVMCQueue@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?
Ben Voigt - 30 Mar 2007 00:06 GMT
>I am having linkage errors in my release build as ff:
>
[quoted text clipped - 33 lines]
>
> 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.
2b|!2b==? - 30 Mar 2007 03:18 GMT
>>I am having linkage errors in my release build as ff:
>>
[quoted text clipped - 36 lines]
> 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 :(

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.