Hi,<br><br>I am trying to create a dll using ITK. I am trying a very simple application:<br><br>---------------<br> typedef itk::Image< unsigned short, 3 > ImageType;<br> <br> ImageType::Pointer image = ImageType::New();
<br> std::cout << "ITK Hello World !" << std::endl;<br> FILE *f;<br> f = fopen("c:/temp/itk.txt","w");<br> fprintf(f,"itk : hello world!!!\n");<br> fclose(f);
<br>------------------<br><br>There is nothing more in it. But I have some problems with msvc 6.0. I modified the makefile (.mak) exported from Visual C++ project, included all the ITK libraries, and other necessary libraries. But when I try to compile (make) it with nmake provided by msvc
6.0: <br><br>.................<br> Searching C:\ITK\bin\bin\Debug\itksys.lib:<br> Searching C:\MSVStudio6\VC98\lib\kernel32.lib:<br> Searching C:\MSVStudio6\VC98\lib\user32.lib:<br> Searching C:\MSVStudio6\VC98\lib\gdi32.lib:
<br> Searching C:\MSVStudio6\VC98\lib\winspool.lib:<br> Searching C:\MSVStudio6\VC98\lib\comdlg32.lib:<br> Searching C:\MSVStudio6\VC98\lib\advapi32.lib:<br> Searching C:\MSVStudio6\VC98\lib\shell32.lib:<br> Searching C:\MSVStudio6\VC98\lib\ole32.lib:
<br> Searching C:\MSVStudio6\VC98\lib\oleaut32.lib:<br> Searching C:\MSVStudio6\VC98\lib\uuid.lib:<br> Searching C:\MSVStudio6\VC98\lib\odbc32.lib:<br> Searching C:\MSVStudio6\VC98\lib\odbccp32.lib:<br> Searching C:\MSVStudio6\VC98\lib\msvcrtd.lib:
<br> Searching C:\ITK\bin\bin\Debug\ITKAlgorithms.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKBasicFilters.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKCommon.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKDICOMParser.lib:
<br> Searching C:\ITK\bin\bin\Debug\ITKEXPAT.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKFEM.lib:<br> Searching C:\ITK\bin\bin\Debug\itkgdcm.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKIO.lib:<br> Searching C:\ITK\bin\bin\Debug\itkjpeg8.lib:
<br> Searching C:\ITK\bin\bin\Debug\itkjpeg12.lib:<br> Searching C:\ITK\bin\bin\Debug\itkjpeg16.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKMetaIO.lib:<br> Searching C:\ITK\bin\bin\Debug\itknetlib.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKniftiio.lib:
<br> Searching C:\ITK\bin\bin\Debug\ITKNrrdIO.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKNumerics.lib:<br> Searching C:\ITK\bin\bin\Debug\itkpng.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKSpatialObject.lib:<br>
Searching C:\ITK\bin\bin\Debug\ITKStatistics.lib:<br> Searching C:\ITK\bin\bin\Debug\itktestlib.lib:<br> Searching C:\ITK\bin\bin\Debug\itktiff.lib:<br> Searching C:\ITK\bin\bin\Debug\itkvcl.lib:<br> Searching C:\ITK\bin\bin\Debug\itkvnl.lib:
<br> Searching C:\ITK\bin\bin\Debug\itkvnl_algo.lib:<br> Searching C:\ITK\bin\bin\Debug\itkvnl_inst.lib:<br> Searching C:\ITK\bin\bin\Debug\itkzlib.lib:<br> Searching C:\ITK\bin\bin\Debug\ITKznz.lib:<br> Searching C:\MSVStudio6\VC98\lib\OLDNAMES.lib:
<br> Searching C:\MSVStudio6\VC98\lib\msvcprtd.lib:<br> Searching C:\ITK\bin\bin\Debug\itksys.lib:<br> Searching C:\MSVStudio6\VC98\lib\kernel32.lib:<br> Searching C:\MSVStudio6\VC98\lib\user32.lib:<br><br>Done Searching Libraries
<br>myitk.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > std::cout" (?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A)<br>myitk.obj
: error LNK2001: unresolved external symbol "__int64 const std::_Fpz" (?_Fpz@std@@3_JB)<br>myitk.obj : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * std::locale::_Locimp::_Global" (?_Global@_Locimp@
locale@std@@0PAV123@A)<br>myitk.obj : error LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" (?_Id_cnt@id@locale@std@@0HA)<br>.\Debug\myitk.dll : fatal error LNK1120: 4 unresolved externals
<br><br><br>How this can happen?? How can it be unable to find cout??? I don't know what to do. <br><br>I know that this is a really bad idea to use visual c++ 6.0 compiler, as it is old and does not complies with ANSI C++. But I have to use it. I managed to compile it as a static library, but I need a dynamic one.
<br><br>Anybody has an idea? <br><br>Thanks in advance,<br><br>haris<br><br>