Hi Insight-Users,<br><br>I am beginning with ITK, and wrote a little program:<br><br>includes of main.cpp:<br><span style="font-family: courier new,monospace;">#include <iostream></span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">// Project includes</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#include "myAppIO.h"</span><br>
<br>includes of myAppIO.h:<br><span style="font-family: courier new,monospace;">//ITK includes</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#include "itkImage.h"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#include "itkImageFileReader.h"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#include "itkImageSeriesWriter.h"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#include "itkNumericSeriesFileNames.h"</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">//Project includes</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#include "myAppCommon.h"</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">typedef itk::ImageFileReader< myAppImage3DType > myApp3DReaderType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">typedef itk::ImageSeriesWriter< myAppImage3DType, myAppImage2DType > myAppWriterType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">typedef itk::NumericSeriesFileNames myAppNameGeneratorType;</span><br>
<br>includes of myAppCommon.h:<br><span style="font-family: courier new,monospace;">#include "itkImage.h"</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">typedef itk::Image< unsigned char, 3 > myAppImage3DType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">typedef itk::Image< unsigned char, 2 > myAppImage2DType;</span><br><br>I am using MinGW Makefiles generator of CMake 2.6, with MinGW gcc version 4.0.<br>Here is the CMakeLists.txt:<br>
<span style="font-family: courier new,monospace;">CMAKE_MINIMUM_REQUIRED(VERSION 2.6)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">PROJECT(myAppProject)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">FIND_PACKAGE(ITK REQUIRED)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">IF(ITK_FOUND)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> INCLUDE(${ITK_USE_FILE})</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ENDIF(ITK_FOUND)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ADD_EXECUTABLE(myApp</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> main.cpp</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> myAppIO.cpp</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">TARGET_LINK_LIBRARIES(myApp ITKCommon ITKIO)</span><br><br>I have compiled ITK with the same compiler and cmake.<br>
When I use the standard output in the main.cpp (like std::cout <<
"Hello World !" << std::endl;) no standard output is visible in
the console cmd.exe. I do not understand why, I sought the issue on
this list and Google, with no luck.<br>
Does anyone what is happening here ?<br><br>Thanks for reading,<br><font color="#888888"><font color="#888888">Emile.<br></font><br>P.S.:
I also build the ITK Hello World example from the ItkSoftwareGuide and
no output is written on standard output. Where is ITK redirecting the
standard outputs ?</font>