[Insight-users] Re : Re : what's this error plz

Luis Ibanez luis.ibanez at kitware.com
Wed Jun 17 10:24:37 EDT 2009


Hi Syrine,

It means that you should *delete* the binary
directory where you are trying to build your
example.

Then create a new directory for that binary
build and configure it.


Please do so,
and then follow the step-by-step instructions
of the Tutorial "Getting Started I".


That will show you how to use ITK from an
external project.


   Regards,


      Luis




----------------------
Syrine Sahmim wrote:
> you have said "start from scratch " what does it mean?
> 
> ------------------------------------------------------------------------
> *De :* Luis Ibanez <luis.ibanez at kitware.com>
> *À :* Syrine Sahmim <syrine.sahmim at yahoo.fr>
> *Cc :* insight-users at itk.org
> *Envoyé le :* Mercredi, 17 Juin 2009, 11h56mn 29s
> *Objet :* Re: Re : [Insight-users] what's this error plz
> 
> 
> Hi Syrine,
> 
> Thanks for posting the error.
> 
> You will really benefit from following the tutorials first
> http://www.itk.org/ITK/help/tutorials.html
> 
> --
> 
> A) Please remove the regular expressions command
>      from your CMakeLists.txt file.
> 
>      You only need:
> 
> 
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> IF(COMMAND CMAKE_POLICY)
>   CMAKE_POLICY(SET CMP0003 NEW)
> ENDIF(COMMAND CMAKE_POLICY)
> 
> FIND_PACKAGE(ITK REQUIRED)
> INCLUDE(${ITK_USE_FILE})
> 
> PROJECT(IOExamples)
> 
> ADD_EXECUTABLE(DicomImageReadWrite DicomImageReadWrite.cxx )
> TARGET_LINK_LIBRARIES(DicomImageReadWrite  ITKIO)
> 
> 
> B) The error message that you posted as a screenshot
>      is clearly indicating that you selected an incorrect
>      compiler when you configured this example.
> 
>      Please delete the binary directory where you are trying
>      to build the example, and start from scratch.  At this
>      point your CMake cache is corrupted.
> 
> 
> 
> Regards,
> 
> 
>        Luis
> 
> 
> 
> 
> ----------------------------------------------------------------------------
> On Wed, Jun 17, 2009 at 6:47 AM, Syrine Sahmim <syrine.sahmim at yahoo.fr 
> <mailto:syrine.sahmim at yahoo.fr>> wrote:
> 
>     ok
>     the error message i have is "DicomImageReadWrite.cxx
>     .\DicomImageReadWrite.cxx(8) : fatal error C1083: Impossible
>     d'ouvrir le fichier include : 'itkImageFileReader.h' : No such file
>     or directory" and i
>     Now,i try to change cmake file now as follows:
>     CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
>     IF(COMMAND CMAKE_POLICY)
>       CMAKE_POLICY(SET CMP0003 NEW)
>     ENDIF(COMMAND CMAKE_POLICY)
>     # Find ITK.
>     FIND_PACKAGE(ITK REQUIRED)
>     INCLUDE(${ITK_USE_FILE})
> 
>     PROJECT(IOExamples)
>     INCLUDE_REGULAR_EXPRESSION("^.*$")
>     ADD_EXECUTABLE(DicomImageReadWrite DicomImageReadWrite.cxx )
>     TARGET_LINK_LIBRARIES(DicomImageReadWrite  ITKIO)
>     but when i execute cmake i have this error (look at the joined file plz)
> 
> 
> 
> 
>     ------------------------------------------------------------------------
>     *De :* Luis Ibanez <luis.ibanez at kitware.com
>     <mailto:luis.ibanez at kitware.com>>
>     *À :* Syrine Sahmim <syrine.sahmim at yahoo.fr
>     <mailto:syrine.sahmim at yahoo.fr>>
>     *Cc :* insight-users at itk.org <mailto:insight-users at itk.org>
>     *Envoyé le :* Mercredi, 17 Juin 2009, 11h33mn 17s
>     *Objet :* Re: [Insight-users] what's this error plz
> 
> 
>     Hy Syrine,
> 
>     The code looks ok.
> 
>     You may be confused with the normal termination of the program.
> 
>     If you run it in Debug mode, and walk line by line,
>     do you get up to the end of the program ?
> 
>     Please let us know,
> 
> 
>           Thanks,
> 
> 
>                Luis
> 
> 
>     ----------------------------------------
>     On Wed, Jun 17, 2009 at 4:34 AM, Syrine Sahmim
>     <syrine.sahmim at yahoo.fr <mailto:syrine.sahmim at yahoo.fr>> wrote:
> 
>         hi,
>         i try the  program below but i have this error when i run
>         it:"the program '[640] Image1.exe: Natif' is stopped with code 0
>         (0x0)."
>         what does mean this error?
>         #if defined(_MSC_VER)
>         #pragma warning ( disable : 4786 )
>         #endif
>         #include "itkImage.h"
>         int main(int, char *[])
>         {  typedef itk::Image< unsigned short, 3 > ImageType;
>            ImageType::Pointer image = ImageType::New();     
>            ImageType::IndexType start;
>           start[0] =   0;  // first index on X
>           start[1] =   0;  // first index on Y
>           start[2] =   0;  // first index on Z
>           ImageType::SizeType  size;
>           size[0]  = 200;  // size along X
>           size[1]  = 200;  // size along Y
>           size[2]  = 200;  // size along Z
>           ImageType::RegionType region;
>           region.SetSize( size );
>           region.SetIndex( start );
>           image->SetRegions( region );
>           image->Allocate();
>           system("pause");
>            return 0;
> 
> 
>         _____________________________________
>         Powered by www.kitware.com <http://www.kitware.com>
> 
>         Visit other Kitware open-source projects at
>         http://www.kitware.com/opensource/opensource.html
> 
>         Please keep messages on-topic and check the ITK FAQ at:
>         http://www.itk.org/Wiki/ITK_FAQ
> 
>         Follow this link to subscribe/unsubscribe:
>         http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> 
> 


More information about the Insight-users mailing list