Why not take the following approach?:<div><br></div><div>1) Compile your ITK code as a static library (.lib instead of .exe) using CMake (or a .dll if you like)</div><div>2) Create a standard MFC application (managing the project with the ordinary Visual studio assistants and project settings) and link the MFC application with the ITK library.</div>
<div><br></div><div>Additionally you end up with your ITK code much more separated from the usual MFC-GUI related code which is always nice.</div><div><br></div><div>HTH</div><div><br></div><div><br><br><div class="gmail_quote">
On Tue, Dec 7, 2010 at 4:15 PM, John Drescher <span dir="ltr"><<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> what should I do to use ITK in MFC without Cmake's compiling?<br>
> I add the ITK's library and ITK's include in C++ directories.My program compiling sucessfully,But Link failed.<br>
> so many "error LNK2001: unresolved external symbol"<br>
> what should I do to solve this problem?<br>
<br>
</div>It is definitly not recommended to build itk or vtk applications<br>
without using CMake. If you want to build your applications without<br>
using CMake you will have to do a lot of work on your part in solving<br>
issues like this. One thing you can do to help is build a small test<br>
application using CMake and copy the compiler settings and linker<br>
settings to your project.<br>
<font color="#888888"><br>
John<br>
</font><div><div></div><div class="h5">_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>