<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2>Dear Insight users:<SPAN
class=984485319-30112004> </SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>In most VC6 generated *.cpp code, there is
a set of micro</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>statements that are useful to detect
memory leak:</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>#ifdef _DEBUG<BR>#define new
DEBUG_NEW<BR>#undef THIS_FILE<BR>static char THIS_FILE[] =
__FILE__;<BR>#endif<BR></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>After combined with ITK, the compiler
start to complain "new"</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>related issues. Some compiling error
messages are listed below:</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>c:\program files\microsoft visual
studio\vc98\include\new(35) : error C2061: syntax error : identifier
'THIS_FILE'<BR>c:\program files\microsoft visual studio\vc98\include\new(35) :
error C2091: function returns function<BR>c:\program files\microsoft visual
studio\vc98\include\new(35) : error C2809: 'operator new' has no formal
parameters<BR>c:\program files\microsoft visual studio\vc98\include\new(36) :
error C2061: syntax error : identifier 'THIS_FILE'<BR>c:\program files\microsoft
visual studio\vc98\include\new(37) : error C2091: function returns
function<BR>c:\program files\microsoft visual studio\vc98\include\new(37) :
error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const
struct std::nothrow_t &)' : overloaded function differs only by return type
from 'void *(__cdecl *__cdecl operator new(void))(unsigned
int)'<BR> c:\program files\microsoft
visual studio\vc98\include\new(35) : see declaration of 'new'<BR>c:\program
files\microsoft visual studio\vc98\include\new(41) : error C2061: syntax error :
identifier 'THIS_FILE'<BR>c:\program files\microsoft visual
studio\vc98\include\new(42) : error C2091: function returns
function<BR>c:\program files\microsoft visual studio\vc98\include\new(42) :
error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void *)'
: overloaded function differs only by return type from 'void *(__cdecl *__cdecl
operator new(void))(unsigned int)'</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>My temporary solution is to quote these
micros out. However, </SPAN></FONT></FONT></FONT></SPAN><SPAN
class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=984485319-30112004>it </SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>would be nice to leave the MFC stuff
intact, as they are useful </SPAN></FONT></FONT></FONT></SPAN><SPAN
class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=984485319-30112004>for </SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>debugging
purpose.</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>My test code is simply a MFC generated
simple MDI application</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>in which I use a Manu selection (an item
in the pull down Manu) </SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>to trigger one of the
</SPAN></FONT></FONT></FONT></SPAN><SPAN class=187094119-30112004><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN class=984485319-30112004>ITK
</SPAN></FONT></FONT></FONT></SPAN><SPAN class=187094119-30112004><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=984485319-30112004>example for image registration. In the VC6
</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>Project Settings, I
</SPAN></FONT></FONT></FONT></SPAN><SPAN class=187094119-30112004><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=984485319-30112004>included the necessary source code in C/C++,
</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>libs in Link, and
</SPAN></FONT></FONT></FONT></SPAN><SPAN class=187094119-30112004><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN class=984485319-30112004>so
</SPAN></FONT></FONT></FONT></SPAN><SPAN class=187094119-30112004><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN class=984485319-30112004>on.
May be I still miss something else for a
</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>proper project
setting.</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004> </DIV></SPAN></FONT></FONT></FONT></SPAN></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=984485319-30112004>Any suggestions for me to get around this
problem?</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004>Thanks,</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004>George</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=187094119-30112004><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=984485319-30112004></SPAN></FONT></FONT></FONT></SPAN> </DIV></BODY></HTML>