[Insight-users] Hello ITK with Qt Creator issue

Barbara Post bpo at eonix.be
Thu Mar 6 03:01:20 EST 2014


Hello again,

Yesterday I went back to my ITK Hello World project based on QMake. I checked libs linkages because my compilation issue is about linkage. I have the following issue: in the QMake project file below I have linkage to ITKBiasCorrection library, as Jothy gave me a list of libs to link against. But in my build/install tree I cannot find neither the header nor the lib matching  ITKBiasCorrection. So my CMake options were incomplete. ITKBioCell exists, however.

Here is my CMake configuration, using CMake-GUI I went to advanced mode.

-          ITK_BUILD_DEFAULT_MODULES: checked

-          Module_ItkVtkGlue: checked

So I clearly miss something to get ITKBiasCorrection build.
Since list of libs is lengthy and I really don't know much, what's your best advice to get a rich but not obese ITK build?

Do you think the following list is a minimal set of required libs?

I'm going to search now for build options but your input is welcome.

ITKBiasCorrection-4.5
ITKBioCell-4.5
ITKCommon-4.5
ITKDICOMParser-4.5
itkdouble-conversion-4.5
ITKEXPAT-4.5
ITKFEM-4.5
itkgdcmCommon-4.5
itkgdcmDICT-4.5
itkgdcmDSED-4.5\
itkgdcmIOD-4.5
itkgdcmjpeg8-4.5
itkgdcmjpeg12-4.5
itkgdcmjpeg16-4.5
itkgdcmMSFF-4.5
ITKgiftiio-4.5
itkhdf5_cpp-4.5
itkhdf5-4.5
ITKIOBioRad-4.5
ITKIOBMP-4.5\
ITKIOCSV-4.5
ITKIOGDCM-4.5
ITKIOGE-4.5
ITKIOGIPL-4.5
ITKIOHDF5-4.5
ITKIOImageBase-4.5
ITKIOIPL-4.5
ITKIOJPEG-4.5
ITKIOLSM-4.5
ITKIOMesh-4.5
ITKIOMeta-4.5
ITKIOMRC-4.5\
ITKIONIFTI-4.5
ITKIONRRD-4.5
ITKIOPNG-4.5
ITKIOSiemens-4.5
ITKIOSpatialObjects-4.5
ITKIOStimulate-4.5
ITKIOTIFF-4.5
ITKIOTransformBase-4.5
ITKIOTransformHDF5-4.5
ITKIOTransformInsightLegacy-4.5\
ITKIOTransformMatlab-4.5
ITKIOVTK-4.5
ITKIOXML-4.5
itkjpeg-4.5
ITKKLMRegionGrowing-4.5
ITKLabelMap-4.5
ITKMesh-4.5
ITKMetaIO-4.5
itkNetlibSlatec-4.5
ITKniftiio-4.5\
ITKNrrdIO-4.5
itkopenjpeg-4.5
ITKOptimizers-4.5
ITKPath-4.5
itkpng-4.5
ITKPolynomials-4.5
ITKQuadEdgeMesh-4.5
ITKSpatialObjects-4.5
ITKStatistics-4.5\
itktiff-4.5
itkv3p_lsqr-4.5
itkv3p_netlib-4.5
itkvcl-4.5
ITKVideoCore-4.5
ITKVideoIO-4.5
itkvnl_algo-4.5
itkvnl-4.5
ITKVNLInstantiation-4.5
ITKVTK-4.5\
ITKVtkGlue-4.5
ITKWatersheds-4.5
itkzlib-4.5
ITKznz-4.5
--
Barbara POST

From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of Barbara Post
Sent: vendredi 28 février 2014 11:34
To: insight-users at itk.org
Subject: Re: [Insight-users] Hello ITK with Qt Creator issue

Hello again,

After compiling VTK, ITK with vtkGlue enabled, I still have troubles when using ITK in a QMake project.

Now the error changed to this one, surprisingly:

ITKCommon-4.5.lib(itkDynamicLoader.obj):-1: error: LNK2019: unresolved external symbol "public: static struct HINSTANCE__ * __cdecl itksys::DynamicLoader::OpenLibrary(char const *)" (?OpenLibrary at DynamicLoader@itksys@@SAPEAUHINSTANCE__@@PEBD at Z) referenced in function "public: static struct HINSTANCE__ * __cdecl itk::DynamicLoader::OpenLibrary(char const *)" (?OpenLibrary at DynamicLoader@itk@@SAPEAUHINSTANCE__@@PEBD at Z)

File not found: ITKCommon-4.5.lib(itkDynamicLoader.obj)

It's really strange because I didn't modify the directories paths and the files are there as expected.

My .pro file, again:

# Pass information to Qmake (include path)
INCLUDEPATH += $$PWD/../../../../../../ITK/include/ITK-4.5
DEPENDPATH += $$PWD/../../../../../../ITK/include/ITK-4.5

# Pass information to Qmake (lib path)
#QMAKE_LIBDIR += \
#    $${ITK_LIBS}
#C:/ITK/lib

# Pass information to Qmake (link against)
win32: LIBS += -L$$PWD/../../../../../../ITK/lib/ \
-lITKBiasCorrection-4.5 \
-lITKBioCell-4.5 \
-lITKCommon-4.5 \
[... list of libs]

My ITK folder is in C:
$$PWD shoud refer to C:\Dev\Projects\MyProject\HelloItk\qmake\HelloItk folder where I have the .pro file.
So why are there 6 "../" instructions in path to climb up, rather than 5 ones ? If I put only 5 "../", it won't find itkImage.h.

I guess I have libs references not in correct order.

Almost going to give up in favor of CMake project :-) so this is my last call to feedback about people who used a QMake project.

Thanks,

--
Barbara POST

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140306/6a94b59a/attachment.html>


More information about the Insight-users mailing list