Sureerat Reaungamornrat
2017-10-13 07:19:23 UTC
Dear All,
I have a problem compiling a simple read-image-file code below in Fedora,
after I build ITK 4.12.1 from source code downloaded from the ITK website.
I did not receive any error for compiling ITK. For compilation of ITK
4.12.1, I did not change the default CMake options of the ITK library, and
the CMake options for compilation were set as
CMAKE_CXX_COMPILER /usr/lib64/ccache/c++
CMAKE_CXX_FLAGS -std=c++11 -pthread
CMAKE_EXE_LINKER_FLAGS -pthread
The error, from compiling the read-image-file code below, was all
"undefined reference to 'vnl_vector<T>::~vnl_vector()'" with some data
types T including long long, short, unsigned char, etc. I attached the file
containing the error (std::cerr from 'make' command for single-thread
compilation) to this email.
// Code --------------------------------------------------
#include "itkImageFileReader.h"
int main()
{
typedef itk::Image<float, 2> ImageType;
typedef itk::ImageFileReader<ImageType> ImageFileReaderType;
ImageFileReaderType::Pointer reader = ImageFileReaderType::New();
reader->SetFileName("some_image_filename");
reader->Update();
ImageType::Pointer image = reader->GetOutput();
return EXIT_SUCCESS;
}
Thank you very much for you time and help,
Best regards,
Ja
I have a problem compiling a simple read-image-file code below in Fedora,
after I build ITK 4.12.1 from source code downloaded from the ITK website.
I did not receive any error for compiling ITK. For compilation of ITK
4.12.1, I did not change the default CMake options of the ITK library, and
the CMake options for compilation were set as
CMAKE_CXX_COMPILER /usr/lib64/ccache/c++
CMAKE_CXX_FLAGS -std=c++11 -pthread
CMAKE_EXE_LINKER_FLAGS -pthread
The error, from compiling the read-image-file code below, was all
"undefined reference to 'vnl_vector<T>::~vnl_vector()'" with some data
types T including long long, short, unsigned char, etc. I attached the file
containing the error (std::cerr from 'make' command for single-thread
compilation) to this email.
// Code --------------------------------------------------
#include "itkImageFileReader.h"
int main()
{
typedef itk::Image<float, 2> ImageType;
typedef itk::ImageFileReader<ImageType> ImageFileReaderType;
ImageFileReaderType::Pointer reader = ImageFileReaderType::New();
reader->SetFileName("some_image_filename");
reader->Update();
ImageType::Pointer image = reader->GetOutput();
return EXIT_SUCCESS;
}
Thank you very much for you time and help,
Best regards,
Ja