Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Add VTK library to Qt project
QtWS25 Last Chance

Add VTK library to Qt project

Scheduled Pinned Locked Moved Solved C++ Gurus
vtk
42 Posts 3 Posters 15.8k Views
  • 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
    Please_Help_me_D
    wrote on 1 Jan 2020, 00:59 last edited by
    #29

    I have the same problem once again.
    After I reinstalled Windows 7 to Windows 10 I can run some simple examples from VTK web-site. But some other examples don't work and I the problem is that I dont get any error message. For example I delete all build folder and run app in debug mode and Qmake compiler output:

    03:44:37: The steps for the VTK project are being carried out ...
    03:44:37: It starts: "C: \ Qt \ 5.12.6 \ msvc2017_64 \ bin \ qmake.exe" C: \ Users \ tasik \ Documents \ Qt_Projects \ VTK \ VTK.pro -spec win32-msvc "CONFIG + = debug "" CONFIG + = qml_debug "
    Info: creating stash file C: \ Users \ tasik \ Documents \ Qt_Projects \ build-VTK-Desktop_Qt_5_12_6_MSVC2017_64_bit-Debug \ .qmake.stash
    03:44:39: The process "C: \ Qt \ 5.12.6 \ msvc2017_64 \ bin \ qmake.exe" completed successfully.
    03:44:39: It starts: "C: \ Qt \ Tools \ qtcreator-4.11.0 \ bin \ jom.exe" -f C: / Users / tasik / Documents / Qt_Projects / build-VTK-Desktop_Qt_5_12_6_MSVC2017_64_bit-Debug / Makefile qmake_all
    
    jom 1.1.3 - empower your cores   // THIS IS HIGHLITED WITH RED COLOR
    
    03:44:39: The process "C: \ Qt \ Tools \ qtcreator-4.11.0 \ bin \ jom.exe" completed successfully.
    03:44:39: Elapsed time: 00:02.
    

    Then I run debug and I get:

    03:48:45: The stages for the VTK project are being executed ...
    03:48:45: Settings have not changed, the qmake stage is skipped.
    03:48:45: It starts: "C: \ Qt \ Tools \ qtcreator-4.11.0 \ bin \ jom.exe"
    C: \ Qt \ Tools \ qtcreator-4.11.0 \ bin \ jom.exe -f Makefile.Debug
    C: \ Qt \ 5.12.6 \ msvc2017_64 \ bin \ uic.exe .. \ VTK \ mainwindow.ui -o ui_mainwindow.h
    cl -c -nologo -Zc: wchar_t -FS -Zc: rvalueCast -Zc: inline -Zc: strictStrings -Zc: throwingNew -Zc: referenceBinding -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 - wd4577 -wd4467 -EHsc /Fddebug\VTK.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_QML_BW_BID_IBWDIBIDIBDIBDIBDIBIDIBDIBDIBWIB -IC: \ apps \ MSVC_apps_debug \ VTK_820 \ include \ vtk-8.2 -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtWidgets -IC: \ Qt \ 5.12 .6 \ msvc2017_64 \ include \ QtGui -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtANGLE -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtCore -Idebug -I. -I / include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ mkspecs \ win32-msvc -Fodebug \ @C: \ Users \ tasik \ AppData \ Local \ Temp \ main.obj.3864.32.jom
    cl -BxC: \ Qt \ 5.12.6 \ msvc2017_64 \ bin \ qmake.exe -nologo -Zc: wchar_t -FS -Zc: rvalueCast -Zc: inline -Zc: strictStrings -Zc: throwingNew -Zc: referenceBinding -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EC: \ Qt \ 5.12.6 \ msvc2017_64 \ mkspecs \ features \ data \ dummy.cpp 2> NUL> debug \ moc_predefs.h
    cl -c -nologo -Zc: wchar_t -FS -Zc: rvalueCast -Zc: inline -Zc: strictStrings -Zc: throwingNew -Zc: referenceBinding -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 - wd4577 -wd4467 -EHsc /Fddebug\VTK.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_QML_BW_BID_IBWDIBIDIBDIBDIBDIBIDIBDIBDIBWIB -IC: \ apps \ MSVC_apps_debug \ VTK_820 \ include \ vtk-8.2 -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtWidgets -IC: \ Qt \ 5.12 .6 \ msvc2017_64 \ include \ QtGui -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtANGLE -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtCore -Idebug -I. -I / include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ mkspecs \ win32-msvc -Fodebug \ @C: \ Users \ tasik \ AppData \ Local \ Temp \ mainwindow.obj.3864.110.jom
    main.cpp
    mainwindow.cpp
    C: \ Qt \ 5.12.6 \ msvc2017_64 \ bin \ moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_LIBD_LIBD_LIB_DIBT_LIB_LIB_LIB_LIB_LIBE_LIB_LIB_LIB_DIT_LIB_LIB_DIT_LIB_DIT_LIBE_LINE /tasik/Documents/Qt_Projects/build-VTK-Desktop_Qt_5_12_6_MSVC2017_64_bit-Debug/debug/moc_predefs.h -IC: /Qt/5.12.6/msvc2017_64/mkspecs/win32-msvc -IC_Projects / ICKms / VTs / ICsProcs / ICsProcs / ICs -IC: /apps/MSVC_apps_debug/VTK_820/include/vtk-8.2 -IC: /Qt/5.12.6/msvc2017_64/include -IC: /Qt/5.12.6/msvc2017_64/include/QtWidgets -IC: /Qt/5.12 .6 / msvc2017_64 / include / QtGui -IC: /Qt/5.12.6/msvc2017_64/include/QtANGLE -IC: /Qt/5.12.6/msvc2017_64/include/QtCore -I. -I "C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ VC \ Tools \ MSVC \ 10/14/25017 \ ATLMFC \ include" -I "C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ VC \ Tools \ MSVC \ 10.14.25017 \ include "-I" C: \ Program Files (x86) \ Windows Kits \ NETFXSDK \ 4.6.1 \ include \ um "-I" C: \ Program Files ( x86) \ Windows Kits \ 10 \ include \ 10.0.18362.0 \ ucrt "-I" C: \ Program Files (x86) \ Windows Kits \ 10 \ include \ 10.0.18362.0 \ shared "-I" C: \ Program Files ( x86) \ Windows Kits \ 10 \ include \ 10.0.18362.0 \ um "-I" C: \ Program Files (x86) \ Windows Kits \ 10 \ include \ 10.0.18362.0 \ winrt ".. \ VTK \ mainwindow.h - o debug \ moc_mainwindow.cpp
    cl -c -nologo -Zc: wchar_t -FS -Zc: rvalueCast -Zc: inline -Zc: strictStrings -Zc: throwingNew -Zc: referenceBinding -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 - wd4577 -wd4467 -EHsc /Fddebug\VTK.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_QML_BW_BID_IBWDIBIDIBDIBDIBDIBIDIBDIBDIBWIB -IC: \ apps \ MSVC_apps_debug \ VTK_820 \ include \ vtk-8.2 -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtWidgets -IC: \ Qt \ 5.12 .6 \ msvc2017_64 \ include \ QtGui -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtANGLE -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ include \ QtCore -Idebug -I. -I / include -IC: \ Qt \ 5.12.6 \ msvc2017_64 \ mkspecs \ win32-msvc -Fodebug \ @C: \ Users \ tasik \ AppData \ Local \ Temp \ moc_mainwindow.obj.3864.1672.jom
    moc_mainwindow.cpp
    link / NOLOGO / DYNAMICBASE / NXCOMPAT / DEBUG / SUBSYSTEM: WINDOWS "/ MANIFESTDEPENDENCY: type = 'win32' name = 'Microsoft.Windows.Common-Controls' version =' 6.0.0.0 'publicKeyToken =' 6595b64144ccf1df 'language =' * '' processorArchitecture = '*' "/ MANIFEST: embed /OUT:debug\VTK.exe @C: \ Users \ tasik \ AppData \ Local \ Temp \ VTK.exe.3864.6172.jom
    03:48:52: The process "C: \ Qt \ Tools \ qtcreator-4.11.0 \ bin \ jom.exe" completed successfully.
    03:48:52: Elapsed time: 00:07.
    

    Everything is well but suddenly I get a window with text "CDB process ended"

    If I run in release mode then QMAKE tells me the same jom 1.1.3 - empower your cores and when running the project compiler tells me something similar as in debug mode but application output:

    03:54:39: C: \ Users \ tasik \ Documents \ Qt_Projects \ build-VTK-Desktop_Qt_5_12_6_MSVC2017_64_bit-Release \ release \ VTK.exe starts ...
    03:54:39: The program ended unexpectedly.
    03:54:39: The process was completed forcibly.
    03:54:39: C: \ Users \ tasik \ Documents \ Qt_Projects \ build-VTK-Desktop_Qt_5_12_6_MSVC2017_64_bit-Release \ release \ VTK.exe failed.
    

    Seems to me that something stops my application... I already turned off Fault Tolerant Heap but that didn't help.
    Here is my kit:kit.png

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Please_Help_me_D
      wrote on 1 Jan 2020, 01:14 last edited by
      #30

      And happy New Year!
      Sorry but I can't leave my project even at such holiday :D

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 1 Jan 2020, 07:42 last edited by
        #31

        Happy new year !

        Did you change any dependency ?
        VTK version ?
        Application name ?

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

        P 1 Reply Last reply 1 Jan 2020, 11:27
        1
        • S SGaist
          1 Jan 2020, 07:42

          Happy new year !

          Did you change any dependency ?
          VTK version ?
          Application name ?

          P Offline
          P Offline
          Please_Help_me_D
          wrote on 1 Jan 2020, 11:27 last edited by
          #32

          @SGaist I recompiled same version of VTK and it's here:
          C:\apps\MSVC_apps_debug\VTK_820
          Then I copied project from E:\Users\Tasik\Documents\Qt_prj\VTK to C:\Users\tasik\Documents\Qt_Projects\VTK. So application name is the same.
          And dependency it is difficult to say but I use the same Qt and MSVC.
          Don't you know what jom 1.1.3 - empower your cores means?
          Here is my Qt configuration:
          qt2.png qt1.png

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 1 Jan 2020, 12:25 last edited by
            #33

            Did you nuke the .pro.user file ?
            If not, this one is likely still configured for your old project.

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

            P 2 Replies Last reply 1 Jan 2020, 13:02
            1
            • S SGaist
              1 Jan 2020, 12:25

              Did you nuke the .pro.user file ?
              If not, this one is likely still configured for your old project.

              P Offline
              P Offline
              Please_Help_me_D
              wrote on 1 Jan 2020, 13:02 last edited by
              #34

              @SGaist yes I looked carefully at the .pro-file and I think it'is ok because it is a standart pro-file with added libraries. I also tried to create new project, add libraries and launche copied main.cpp - the same result.
              Do you know what jom 1.1.3 - empower your cores means? Beaucause this is the only thing that sometimes is highlited with red color
              pro.png CDB.png

              1 Reply Last reply
              0
              • S SGaist
                1 Jan 2020, 12:25

                Did you nuke the .pro.user file ?
                If not, this one is likely still configured for your old project.

                P Offline
                P Offline
                Please_Help_me_D
                wrote on 1 Jan 2020, 13:57 last edited by
                #35

                @SGaist I found that I don't have PATH (all in capital) neither in ENVIRONMENT VARIABLES nor in SYSTEM VARIABLES.
                I only have Path ENVIRONMENT VARIABLE. Maybe I should create it and point to some Qt or Visual Studio components?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 1 Jan 2020, 19:32 last edited by
                  #36

                  I wasn't talking about the .pro file but the .pro.user file that is generated by Qt Creator and which contains the various settings of your project.

                  No, just use Path since it's what is already used by the system (I currently don't know why the casing has changed).

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

                  P 1 Reply Last reply 1 Jan 2020, 20:21
                  1
                  • S SGaist
                    1 Jan 2020, 19:32

                    I wasn't talking about the .pro file but the .pro.user file that is generated by Qt Creator and which contains the various settings of your project.

                    No, just use Path since it's what is already used by the system (I currently don't know why the casing has changed).

                    P Offline
                    P Offline
                    Please_Help_me_D
                    wrote on 1 Jan 2020, 20:21 last edited by
                    #37

                    @SGaist yes, I've tried to delete it but unfortunately that didn't help
                    I don't have any idea what is the possible reason of my problem now

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 1 Jan 2020, 21:47 last edited by
                      #38

                      You may have gremlins in your machine...

                      Did you check with DependencyWalker if you are missing any dll ?

                      As for the jom message, jom is a nmake replacement that does handle parallel building in a better.

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

                      P 2 Replies Last reply 1 Jan 2020, 23:46
                      1
                      • S SGaist
                        1 Jan 2020, 21:47

                        You may have gremlins in your machine...

                        Did you check with DependencyWalker if you are missing any dll ?

                        As for the jom message, jom is a nmake replacement that does handle parallel building in a better.

                        P Offline
                        P Offline
                        Please_Help_me_D
                        wrote on 1 Jan 2020, 23:46 last edited by
                        #39

                        @SGaist said in Add VTK library to Qt project:

                        You may have gremlins in your machine...

                        What is "gremlins"?
                        I just tried dependency walker even I dont fully understand how to use it (I clicked File->Open MyApp) I can say that all these libraries that are highlighted with yellow I have in C:\apps\MSVC_apps_debug\VTK_820\bin
                        And I added this /bin path to Path and PATH variables in Qt Runtime Environment (in Projects tab)
                        dll.png DependencyWalker.png

                        1 Reply Last reply
                        0
                        • S SGaist
                          1 Jan 2020, 21:47

                          You may have gremlins in your machine...

                          Did you check with DependencyWalker if you are missing any dll ?

                          As for the jom message, jom is a nmake replacement that does handle parallel building in a better.

                          P Offline
                          P Offline
                          Please_Help_me_D
                          wrote on 2 Jan 2020, 01:28 last edited by
                          #40

                          @SGaist thank you!
                          Tanks to your idea that I miss some libraries I doble clicked on MyApp.exe :)
                          And it told me that it needs some VTK libraries and ZLIB!!! O forgot that when I was compiling VTK libraries last time (on Windows 10) I pointed that I have ZLIB in Cmake GUI and when I did it before (on Windows 7) I didn't do that. And it seems to me that the debugger doesn't have to tell me wether I miss libraries or not.

                          Then I copied .dll files from /VTK/bin and /ZLIB/bin to MyApp.exe folder and it worked
                          Then I added /ZLIB/bin to the PATH and deleted .dll files from MyApp.exe folder and it also worked
                          But what is the difference between BUILD and RUNTIME settings in as in picture below? Now I added path to /VTK/bin and /ZLIB/bin in both of them.
                          Tomorrow I'm going to try other examples from VTK web-site but I think all of them should now wooooork :)
                          difference.png

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 2 Jan 2020, 18:38 last edited by
                            #41

                            Glad you found out and thanks for sharing !

                            As for the gremlin, it comes from an old plane related sabotaging critter.

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

                            P 1 Reply Last reply 2 Jan 2020, 22:04
                            0
                            • S SGaist
                              2 Jan 2020, 18:38

                              Glad you found out and thanks for sharing !

                              As for the gremlin, it comes from an old plane related sabotaging critter.

                              P Offline
                              P Offline
                              Please_Help_me_D
                              wrote on 2 Jan 2020, 22:04 last edited by
                              #42

                              @SGaist ahaha thank for gremlins)

                              1 Reply Last reply
                              0

                              38/42

                              1 Jan 2020, 21:47

                              • Login

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