<DIV>
<DIV>Hi Luis and All&nbsp; !!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>tank's for advanced me !!!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm try to set my CmakeList with Visual Studio .NET 2003. So i create a simple Window Form Aplication (.NET). VS&nbsp;.NET<BR>generated the following files - Form1.cpp, stdafx.cpp,&nbsp;app.rc,<BR>AssemblyInfo.cpp, Form1.h, resource.h, stdafx.h. Then i tryed to set the CmakeList like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>PROJECT( teste )</DIV>
<DIV>&nbsp;</DIV>
<DIV>ADD_DEFINITIONS(-D_AFXDLL) </DIV>
<DIV>&nbsp;</DIV>
<DIV>SET(CMAKE_MFC_FLAG 6)</DIV>
<DIV><BR>SET(teste_SRCS <BR>&nbsp;&nbsp; Form1.cpp<BR>&nbsp;&nbsp; AssemblyInfo.cpp&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; app.rc&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; stdafx.cpp<BR>&nbsp;&nbsp; )</DIV>
<DIV>&nbsp;</DIV>
<DIV>IF(WIN32)<BR>&nbsp; LINK_LIBRARIES(<BR>&nbsp;&nbsp;&nbsp; wsock32<BR>&nbsp; )<BR>ENDIF(WIN32)</DIV>
<DIV><BR>FIND_PACKAGE(ITK)<BR>IF(ITK_FOUND)<BR>&nbsp;&nbsp; INCLUDE(${ITK_USE_FILE})<BR>ELSE(ITK_FOUND)<BR>&nbsp;&nbsp; MESSAGE(FATAL_ERROR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Cannot build without ITK.&nbsp; Please set ITK_DIR.")<BR>ENDIF(ITK_FOUND)</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>INCLUDE_DIRECTORIES(C:/"Arquivos de programas/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include/")<BR></DIV>
<DIV>INCLUDE_DIRECTORIES(C:/"Arquivos de programas/Microsoft Visual Studio .NET 2003/Vc7/Include/")<BR></DIV>
<DIV>LINK_LIBRARIES(C:/"Arquivos de programas/Microsoft Visual Studio .NET 2003/Vc7/lib/")</DIV>
<DIV>&nbsp;</DIV>
<DIV>ADD_EXECUTABLE (teste WIN32 ${teste_SRCS})<BR></DIV>
<DIV>TARGET_LINK_LIBRARIES(teste ${ITK_LIBRARIES} )</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;Cmake execute without errors, but when i tryed to BUILD&nbsp;Solution,&nbsp; the sln made by Cmake, &nbsp;this error happen (tank's a lot for your help)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<TABLE width="100%" bgColor=#dfdfe5>
<TBODY>
<TR>
<TD><FONT face=arial size=+2>Output Window </FONT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=*>
<TBODY>
<TR>
<TD width=0 bgColor=#ededf5>&nbsp;</TD>
<TD width=0 bgColor=#ffffff>&nbsp;</TD>
<TD width=*><PRE>Compiling...
AssemblyInfo.cpp
\Doutorado\teste\AssemblyInfo.cpp(3) : error C2653: 'System' : is not a class or namespace name
\Doutorado\teste\AssemblyInfo.cpp(3) : error C2871: 'Reflection' : a namespace with this name does not exist
\Doutorado\teste\AssemblyInfo.cpp(4) : error C2653: 'System' : is not a class or namespace name
\Doutorado\teste\AssemblyInfo.cpp(4) : error C2871: 'CompilerServices' : a namespace with this name does not exist
\Doutorado\teste\AssemblyInfo.cpp(11) : error C3746: 'AssemblyTitleAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(11) : error C2337: 'AssemblyTitleAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(12) : error C3746: 'AssemblyDescriptionAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(12) : error C2337: 'AssemblyDescriptionAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(13) : error C3746: 'AssemblyConfigurationAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(13) : error C2337: 'AssemblyConfigurationAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(14) : error C3746: 'AssemblyCompanyAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(14) : error C2337: 'AssemblyCompanyAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(15) : error C3746: 'AssemblyProductAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(15) : error C2337: 'AssemblyProductAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(16) : error C3746: 'AssemblyCopyrightAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(16) : error C2337: 'AssemblyCopyrightAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(17) : error C3746: 'AssemblyTrademarkAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(17) : error C2337: 'AssemblyTrademarkAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(18) : error C3746: 'AssemblyCultureAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(18) : error C2337: 'AssemblyCultureAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(31) : error C3746: 'AssemblyVersionAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(31) : error C2337: 'AssemblyVersionAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(55) : error C3746: 'AssemblyDelaySignAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(55) : error C2337: 'AssemblyDelaySignAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(56) : error C3746: 'AssemblyKeyFileAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(56) : error C2337: 'AssemblyKeyFileAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
\Doutorado\teste\AssemblyInfo.cpp(57) : error C3746: 'AssemblyKeyNameAttribute': only custom attributes can be used on assemblies or modules
\Doutorado\teste\AssemblyInfo.cpp(57) : error C2337: 'AssemblyKeyNameAttribute' : attribute not found; it is neither a built-in nor a custom attribute that is accessible in the current namespace
Form1.cpp
d:\Doutorado\teste\Form1.h(6) : error C2871: 'System' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(7) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(7) : error C2871: 'ComponentModel' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(8) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(8) : error C2871: 'Collections' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(9) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(9) : error C2871: 'Forms' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(10) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(10) : error C2871: 'Data' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(11) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(11) : error C2871: 'Drawing' : a namespace with this name does not exist
d:\Doutorado\teste\Form1.h(22) : error C2059: syntax error : 'public'
d:\Doutorado\teste\Form1.h(22) : error C2059: syntax error : 'public'
d:\Doutorado\teste\Form1.h(22) : error C2653: 'System' : is not a class or namespace name
d:\Doutorado\teste\Form1.h(23) : error C2143: syntax error : missing ';' before '{'
d:\Doutorado\teste\Form1.h(23) : error C2447: '{' : missing function header (old-style formal list?)
d:\Doutorado\teste\Form1.h(57) : fatal error C1190: managed targeted code requires '#using <MSCORLIB.DLL>' and '/clr' option
Generating Code...
</PRE></TD></TR></TBODY></TABLE><BR><BR><B><I>Luis Ibanez &lt;luis.ibanez@kitware.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Marcelo,<BR><BR>For an example on how to use ITK with MFC you may want<BR>to look at the application in <BR><BR>InsightApplications/ItkMFC.<BR><BR>What you do is to start the skeleton of your app using the<BR>VisualStudio IDE, then create a CMakeList.txt file that uses<BR>the files generated by VisualStudio. Then, from there, you<BR>generate the Visual Studio project using CMake.<BR><BR><BR>Regards,<BR><BR>Luis<BR><BR><BR>-------------------------<BR>Oliveira Marcelo wrote:<BR><BR>&gt; Hi Luis and All !!!!<BR>&gt; <BR>&gt; Tanks a lot for your help !!!<BR>&gt; <BR>&gt; OK, i run my Hello !!!! But now i want to run this Hello inside a Form !!<BR>&gt; <BR>&gt; What i don't undestand yet is, How can i run my example with a Window <BR>&gt; Form Aplication (.NET) or using a GUI from VS .NET.<BR>&gt; <BR>&gt; For example: When i create a simple Window Form Aplication (.NET), VS <BR>&gt;
 generate the following files - Form1.cpp, stdafx.cpp, <BR>&gt; AssemblyInfo.cpp, Form1.h, resource.h, stdafx.h.<BR>&gt; <BR>&gt; I made my CMalist like this:<BR>&gt; ADD_LIBRARY( Form1.cpp stdafx.cpp ) <BR>&gt; ADD_EXECUTABLE(formTest Form1.cpp stdafx.cpp )<BR>&gt; TARGET_LINK_LIBRARIES(formTest ITKNumerics ITKCommon ITKBasicFilters <BR>&gt; ITKIO ITKAlgorithms )<BR>&gt; And i put on Form1.cpp the #include "itkImage.h"<BR>&gt; <BR>&gt; CMake run ok, and create the bin directory with formTest.sln<BR>&gt; <BR>&gt; but when i try to build all to generete the EXE file inside the VS a <BR>&gt; lot of error happened !!!!<BR>&gt; <BR>&gt; What im doing wrong !!!!<BR>&gt; <BR>&gt; Tanks for your Hints and time !!!!<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;<BR>&gt; <BR>&gt; <BR>&gt;<BR>&gt; */Luis Ibanez <LUIS.IBANEZ@KITWARE.COM>/* wrote:<BR>&gt;<BR>&gt;<BR>&gt; Hi Marcelo,<BR>&gt;<BR>&gt; You should use CMake for configuring your own Example.<BR>&gt;<BR>&gt; Please follow the instructions in the
 Tutorial sessions:<BR>&gt;<BR>&gt; http://www.itk.org/HTML/Tutorials.htm<BR>&gt;<BR>&gt; in particular in<BR>&gt;<BR>&gt; http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html<BR>&gt; http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img27.html<BR>&gt;<BR>&gt; You should also read the first two chapters of the<BR>&gt; SoftwareGuide:<BR>&gt;<BR>&gt; http://www.itk.org/ItkSoftwareGuide.pdf<BR>&gt;<BR>&gt;<BR>&gt; That will save you a lot of time.<BR>&gt;<BR>&gt;<BR>&gt; Regards,<BR>&gt;<BR>&gt;<BR>&gt; Luis<BR>&gt;<BR>&gt;<BR>&gt; -------------------------<BR>&gt; Oliveira Marcelo wrote:<BR>&gt;<BR>&gt; &gt; Hi user's !!!!<BR>&gt; &gt;<BR>&gt; &gt; ITK and VS .NET 2003 installed OK using CMAKE 2.0 on my Win XP.<BR>&gt; &gt;<BR>&gt; &gt; And now, i want to run a simple example:<BR>&gt; &gt;<BR>&gt; &gt; Then i create a Window Form Aplication (.NET) and in Form1.cpp i<BR>&gt; put &lt; BR&gt;&gt; the #include "itkImage.h"<BR>&gt; &gt;<BR>&gt; &gt; I set
 the Includes and Library (TOOLS -&gt; Option -&gt; Projects -&gt; VC++<BR>&gt; &gt; Projects ) then when i build solution this message happen<BR>&gt; &gt;<BR>&gt; &gt; fatal error C1083: Cannot open include file:<BR>&gt; 'vnl/vnl_vector_ref.h': No<BR>&gt; &gt; such file or directory d:\ITK\Code\Common\itkVector.h(21):<BR>&gt; &gt;<BR>&gt; &gt; What is the right way to execute VS 2003 .NET and ITK ????<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; tanks for advanced me<BR>&gt; &gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; Yahoo! Mail <BR>&gt; <HTTP: br.info.mail.yahoo.com *http: taglines mail br.rd.yahoo.com /><BR>&gt; agora ainda melhor: 100MB, anti-spam e antivírus grátis!<BR>&gt;<BR>&gt;------------------------------------------------------------------------<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;Insight-users mailing
 list<BR>&gt;Insight-users@itk.org<BR>&gt;http://www.itk.org/mailman/listinfo/insight-users<BR>&gt; <BR>&gt;<BR><BR><BR><BR><BR></BLOCKQUOTE></DIV><p>
                <hr size=1><a href="http://br.rd.yahoo.com/mail/taglines/*http://br.info.mail.yahoo.com/">Yahoo! Mail</a> agora ainda melhor: 100MB, anti-spam e antivírus grátis!