<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I'm happy to say it's finally working. I stepped through the debugger and this time found a problem in my application that I had previously fixed on a local copy, but with all the fresh checkouts to compare old vs. new, I neglected to checkin or re-implement my fix. So now I have my old app fully working on VS 2008 with vtk 5.2.1 and all static links. Thanks for all the help!! It is greatly appreciated.<BR><BR>--- On <B>Fri, 2/6/09, David Cole <I><david.cole@kitware.com></I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: David Cole <david.cole@kitware.com><BR>Subject: Re: vtkMFC as .dll vs static library<BR>To: "Alon Mozes" <amozes77@yahoo.com><BR>Cc: vtkusers@vtk.org<BR>Date: Friday, February 6, 2009, 10:00 AM<BR><BR>
<DIV id=yiv1822781869>
<DIV class=gmail_quote>On Thu, Feb 5, 2009 at 11:33 PM, Alon Mozes <SPAN dir=ltr><<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>I have carefully cleaned, rebuilt and compiled vtk, itk, and my project using only "MT(d)" references. I can now compile and link with no errors.</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Excellent...</DIV>
<DIV><BR></DIV>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>But when I launch the app.............<SPAN class=Apple-style-span style="FONT-SIZE: 10px"> 0x027CB6B0, 296 bytes long.</SPAN></DIV><FONT size=1>
<DIV>Data: < g& > CD CD CD CD 00 00 00 00 C0 67 26 03 CD CD CD CD </DIV>
<DIV>Object dump complete.</DIV>
<DIV>The program '[85320] .exe: Native' has exited with code 1 (0x1).</DIV></FONT>
<DIV> </DIV>
<DIV>Is this still related to a linker error?</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>No, probably not. (Since you do not have the linker error anymore, but this is still happening...)</DIV>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV> Does delay loading play a role even though I'm statically linking?</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>No, it shouldn't -- if you are statically linking everything, then there is nothing to delay load...</DIV>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV> Any tips on figuring it out from here?</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Two things to try:</DIV>
<DIV>(1) Choose "Debug > Exceptions" from the Visual Studio menu bar and check all the boxes to break when an exception is thrown. If one is thrown, copy and paste the call stack and send it to the mailing list.</DIV>
<DIV>(2) Step into your program with the debugger ("Debug > Step Into" in the menu) and single step to see who is returning the "1" exit code. (Or just run, and set a breakpoint in the MFC leak reporting code and see how it's being called...)</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>HTH,</DIV>
<DIV>David</DIV>
<DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></td></tr></table><br>