[Insight-users] fatal error LNK1104: cannot open file 'ITKFltkImageViewer.lib'

ch mr chmail2011 at gmail.com
Thu Dec 30 05:48:41 EST 2010


hi insight users,
I'm new with the insight platform, i've tried to start my first program but
i'm encountring problem while building the program which is :

LINK : fatal error LNK1104: cannot open file 'ITKFltkImageViewer.lib'

This my cmakelists.txt :

PROJECT(TIM3D)

FIND_PACKAGE(ITK)

IF(ITK_FOUND)

INCLUDE(${ITK_USE_FILE})

ELSE(ITK_FOUND)

MESSAGE(FATAL_ERROR

"Cannot build InsightApplications without ITK. Please set ITK_DIR.")

ENDIF(ITK_FOUND)

FIND_PACKAGE(FLTK)

IF(FLTK_FOUND)

INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})

ENDIF(FLTK_FOUND)

INCLUDE_DIRECTORIES(

C:/ItkVtk/InsightApplications-3.20.0/Auxiliary/FltkImageViewer

C:/ItkVtk/ItkAppBin/Auxiliary/FltkImageViewer

${Tim3D_SOURCE_DIR}

${Tim3D_BINARY_DIR}

)

FIND_LIBRARY(FltkImageViewer_LIBRARY NAMES FltkImageViewer )

ADD_EXECUTABLE(TIM3D TIM3D.cxx)

TARGET_LINK_LIBRARIES(TIM3D ITKIO ITKBasicFilters ITKNumerics ITKCommon
ITKFltkImageViewer ${FltkImageViewer}

${FLTK_LIBRARIES})

***************************************************************************************

this the code :

#include <iostream>

#include "itkImage.h"

#include "itkImageFileReader.h"

#include "fltkImage2DViewer.h"

#include "FL/fl_file_chooser.H"

int usage(void)

{

std::cout << "Tim3D" << std::endl;

std::cout << std::endl;

std::cout << "TIM3D <Filename>" << std::endl;

std::cout << std::endl;

return 1;

}

int main(int argc, char **argv)

{

typedef itk::Image< float, 2 > ImageType;

char *fName;

if(argc > 2)

{

return usage();

}

else

if(argc == 1)

{

fName = fl_file_chooser("charger projections", "*.bmp", ".");

if(fName == NULL || strlen(fName)<1)

{

return 0;

}

}

else

if(argv[1][0] != '-')

{

fName = argv[argc-1];

}

else

{

return usage();

}

std::cout << "chargement: " << fName << std::endl;

typedef itk::ImageFileReader< ImageType > VolumeReaderType;

VolumeReaderType::Pointer reader = VolumeReaderType::New();

reader->SetFileName(fName);

try

{

reader->Update();

}

catch( itk::ExceptionObject & exception )

{

std::cout << "Problems reading file format" << std::endl;

std::cout << exception << std::endl;

return 1;

}

std::cout << "...Done Loading File" << std::endl;

 typedef fltk::Image2DViewer<ImageType::PixelType> ImageViewerType;

ImageViewerType::Pointer viewer = ImageViewerType::New();

viewer->SetLabel( fName );

viewer->SetImage( reader->GetOutput() );

viewer->Show();

Fl::run();

return 1;

}

************************************************************************************

I didn't know how to resolve this problem. I look for the requested library
file 'ITKFltkImageViewer.lib' and i find it here :
C:/ItkVtk/ItkAppBin/VolviewPlugIns/bin/Debug

waiting for your help, and thx

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101230/56c3cb73/attachment.htm>


More information about the Insight-users mailing list