Hi Tom,<br> <br> Thanks for the reply.&nbsp; My plan is to write simple reference classes to wrap the unmanaged (itk) code.&nbsp;&nbsp; This should work just fine for incorporating unmanaged C++ code.&nbsp; For instance:<br> <br> //****Managed wrapper class*****<br> public ref class MikeWrapper<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp; public:<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MikeWrapper(Int32 initial);<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; void PrintValue();<br> &nbsp;&nbsp;&nbsp; private:<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MikeClass&lt;int&gt; *pMike;<br> &nbsp;&nbsp;&nbsp; <br> //**Unmanaged C++ class****<br> template&lt;typename T&gt; <br> &nbsp;&nbsp;&nbsp; class MikeClass<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp; public:<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MikeClass(T&nbsp; value) {<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; myvec.push_back(value);<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; void PrintValue(){<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout&lt;&lt; myvec[0] &lt;&lt; std::endl;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br> <br> &nbsp;&nbsp;&nbsp; private:<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::vector&lt;T&gt; myvec;<br> &nbsp;&nbsp;&nbsp; };<br> <br> //********************<br> <br> &nbsp; At this point, the GUI can be written in a CLR language ( (C++/CLI, C#) and just access the wrapper class.<br> <br> My tripping point is the compiler settings. The header for the unmanaged class&nbsp; calls itkImage.h and thus needs to have the correct ITK compiler settings, include directories and libraries.&nbsp; I can't use CMake unfortunately because it only sets up normal unmanaged C++ projects. John Biddiscombe posted some tips back in 2004 on how to do this in this list, but I can't seem to make it work.<br><br>Thanks for reading again.<br><br><br><br><br><b><i>Thomas Lambertz
 &lt;thomas@hexerei-software.de&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hello Mike,<br><br>the difference between C++/CLI and conventional unmanaged C++ is much <br>more than only a compilerstep. For example there are no raw-pointer in <br>CLI and there are many other types that have changed. So it doesnt work <br>to set up a project for CLI by only changing some parameters in CMake. <br> From my point of view there´s no way to compile ITK as CLI without <br>rewriting nearly the complete code (but i am prepared to learn). <br>Resulting performance may be another contraindication.<br><br>Have you considered a mixedmode application ? I have approached it that <br>way. My GUI runs as a CLI-app while access to ITK is encapsulated in an <br>unmanaged DLL (you have to spent some attention on memory-management). <br>Needs some work on a wrapper but the benefits of the new gui-handling
 <br>may pay of for you.<br><br>Statically linking the (conventional) ITK library against a mixedmode <br>application by using "#pragma (un)managed" and some marshalling may also <br>work.I am sure there are more suitable solutions...<br><br>Regards,<br>Tom<br><br><br>Mike Feur wrote:<br>&gt;  Hello,<br>&gt;<br>&gt;  I am trying to create a Common Language Runtime C++/CLI project that<br>&gt;  includes ITK code in Visual Studio 2005.<br>&gt;<br>&gt;  There is no Cmake file for me to use.   I have tried manually copying<br>&gt;  over all the include directories from a Cmake created ITK project.  I<br>&gt;  am getting linker errors such as<br>&gt;<br>&gt;  "error LNK2001: unresolved external symbol "public: virtual void<br>&gt;  __thiscall itk::EventObject::Print(class std::basic_ostream&lt; ....."<br>&gt;<br>&gt;  I tried including the appropriate lib files by adding the<br>&gt;  "...\InsightBin\bin\debug" directory to the  "Configuration<br>&gt; 
 Properties\Linker\General\Additional Library Directories" dialog box<br>&gt;  in the Property Pages for the Solution, but still no luck.<br>&gt;<br>&gt;<br>&gt;  Any suggestions or instructions of how to integrate ITK into a CLR<br>&gt;  solution?<br>&gt;<br>&gt;  Best of all would be a Cmake file to use, similar to the one<br>&gt;  available for MFC.<br>&gt;<br>&gt;<br>&gt;  Thanks for taking the time to read this.<br>&gt;<br>t<br>_______________________________________________<br>Insight-users mailing list<br>Insight-users@itk.org<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote><br><p>
                <hr size=1>Yahoo! Messenger with Voice. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman1/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">Make PC-to-Phone Calls</a> to the US (and 30+ countries) for 2¢/min or less.