Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Using ITK in Qt Creator issue
Forum Updated to NodeBB v4.3 + New Features

Using ITK in Qt Creator issue

Scheduled Pinned Locked Moved 3rd Party Software
5 Posts 2 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    postb99
    wrote on 26 Feb 2014, 14:25 last edited by
    #1

    Hello,

    I've searched here and there, followed suggstion on itk-users mailing list but itkImage.h header is still not found.

    I compiled and installed latest ITK (4.5.1), using MSVC 2010 64bit compiler. I created a plain C++ project and copied code for ITK Hello World program.

    Thanks for your help.

    Qt Creator project file: http://pastebin.com/3pGLjbNw

    main.cpp : http://pastebin.com/9kzp3tkd

    Compilation result : http://pastebin.com/BUpt1pK3

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Feb 2014, 21:02 last edited by
      #2

      Hi,

      Maybe a stupid question but: is itkImage.h really in C:/ITK/include/ITK-4.5 and not in a further subdirectory ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        postb99
        wrote on 28 Feb 2014, 14:00 last edited by
        #3

        Well, before giving up and switch to CMakeLists.txt format...

        After compiling VTK, ITK with vtkGlue enabled, I still have troubles, and yes file is where stated, SGaist.

        @ITKCommon-4.5.lib(itkDynamicLoader.obj):-1: error: LNK2019: unresolved external symbol "public: static struct HINSTANCE__ * cdecl itksys::DynamicLoader::OpenLibrary(char const *)" (?OpenLibrary@DynamicLoader@itksys@@SAPEAUHINSTANCE@@PEBD@Z) referenced in function "public: static struct HINSTANCE__ * cdecl itk::DynamicLoader::OpenLibrary(char const *)" (?OpenLibrary@DynamicLoader@itk@@SAPEAUHINSTANCE@@PEBD@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.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Feb 2014, 20:51 last edited by
          #4

          Hi,

          Something's not clear, do you have both symbols and library not found ? Or only symbols ?

          Also, you should rather give the absolute path to ITK rather than relative, it will be cleaner and you'll be sure to point to the correct folders

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            postb99
            wrote on 5 Mar 2014, 07:50 last edited by
            #5

            I may give a new try soon, will keep you posted.

            1 Reply Last reply
            0

            5/5

            5 Mar 2014, 07:50

            • Login

            • Login or register to search.
            5 out of 5
            • First post
              5/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved