<div style="direction: ltr;">Hi,<br><br>I tried cmake, it created the
project. However, Visual C++ couldn't compile it. I had 44 errors, all
of which was unresolved references. I added additional lib and include
libraries to the project, but no luck. I exported the makefile, and
edited it. I get the same error as always:<br><br>.................<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itksys.lib:<br><div style="direction: ltr;">&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\kernel32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\user32.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\gdi32.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\winspool.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\comdlg32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\advapi32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\shell32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\ole32.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\oleaut32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\uuid.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\odbc32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\odbccp32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\msvcrtd.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKAlgorithms.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKBasicFilters.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKCommon.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKDICOMParser.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKEXPAT.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKFEM.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkgdcm.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKIO.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkjpeg8.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkjpeg12.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkjpeg16.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKMetaIO.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itknetlib.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKniftiio.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKNrrdIO.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKNumerics.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkpng.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKSpatialObject.lib:<br>

&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKStatistics.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itktestlib.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itktiff.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkvcl.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkvnl.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkvnl_algo.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkvnl_inst.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itkzlib.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\ITKznz.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\OLDNAMES.lib:
<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\msvcprtd.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\ITK\bin\bin\Debug\itksys.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\kernel32.lib:<br>&nbsp;&nbsp;&nbsp; Searching C:\MSVStudio6\VC98\lib\user32.lib:</div>Done Searching Libraries
<br>myitk.obj : error LNK2001: unresolved external symbol &quot;class
std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt;
std::cout&quot; (?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A)<br>myitk.obj
 : error LNK2001: unresolved external symbol &quot;__int64 const std::_Fpz&quot; (?_Fpz@std@@3_JB)<br>myitk.obj
: error LNK2001: unresolved external symbol &quot;private: static class
std::locale::_Locimp * std::locale::_Locimp::_Global&quot;
(?_Global@_Locimp@
locale@std@@0PAV123@A)<br>myitk.obj : error LNK2001: unresolved
external symbol &quot;private: static int std::locale::id::_Id_cnt&quot;
(?_Id_cnt@id@locale@std@@0HA)<br>.\Debug\myitk.dll : fatal error LNK1120: 4 unresolved externals
<br><br><br>I had searched the net, and saw that these kind of errors are
very common to vc++ 6.0. Is there anybody who succeded in creating an
ITK DLL with msvc++ 6.0?<br><br>I am new to windows application development (I use linux normally), so maybe I made a very elemental error.<br><br>Thanks,<br><br>haris<br><br>PS: And for the DLL part, my code was like this:
<br><br>----------------<br>1. myitk.h:<br>----------------<br><br>#ifndef __HELLO_H<br>#define __HELLO_H<br>#ifndef __HELLO__<br>#define __HELLOLIB__ __declspec(dllimport)<br>#else<br>#define __HELLOLIB__ __declspec(dllexport)
<br>#endif<br>__HELLOLIB__ int myitkhello() ;<br>#endif<br><br>#include &quot;C:\ITK\src\Code\Common\itkWin32Header.h&quot;<br>#include &quot;itkImage.h&quot;<br><br><br>class myitk<br>{<br>&nbsp; public:<br>&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myitk();
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~myitk();<br><br>};<br><br>----------------<br>myitk.cpp:<br>----------------<br><br>#define __HELLO__<br>#include &quot;myitk.h&quot;<br><br>myitk::myitk() {</div><div style="direction: ltr;"><span class="q">
<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; typedef itk::Image&lt; unsigned short, 3 &gt; ImageType;
<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; ImageType::Pointer image = ImageType::New();<br>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; &quot;ITK Hello World !&quot; &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; FILE *f;<br>&nbsp;&nbsp;&nbsp; f = fopen(&quot;c:/temp/itk.txt&quot;,&quot;w&quot;);<br>
&nbsp;&nbsp;&nbsp; fprintf(f,&quot;itk : hello world!!!\n&quot;);<br>&nbsp;&nbsp;&nbsp; fclose(f);<br>&nbsp;&nbsp;&nbsp; <br>}<br><br><br></span></div>myitk::~myitk()<br>{<br><br>}<br><br>__HELLOLIB__ int myitkhello() {<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; myitk mtk();<br>&nbsp;&nbsp;&nbsp; return 0;&nbsp;&nbsp;&nbsp; 
<br>}