Add VTK library to Qt project
-
It's PATH, all in capital.
-
wrote on 3 Dec 2019, 18:39 last edited by Please_Help_me_D 12 Mar 2019, 18:42This post is deleted!
-
wrote on 3 Dec 2019, 19:17 last edited by
@SGaist I have PATH variable only if I check on "Purely system environment" and in this case after I add path to the VTK/bin (C:\apps\MSVC_apps_release\VTK\bin) folder then I get an error:
:-1: error: cannot open C:\Windows\main.obj.7068.0.jom for write
And it doesn't matter whether I add path to the VTK/bin or not. In "Purely system environment" mode my app gives the same error :( -
That looks like a build problem because it tries to write file somewhere it should not.
Did you do that in the Run part only ?
-
That looks like a build problem because it tries to write file somewhere it should not.
Did you do that in the Run part only ?
wrote on 3 Dec 2019, 19:41 last edited by@SGaist what is Run part? sorry
-
That looks like a build problem because it tries to write file somewhere it should not.
Did you do that in the Run part only ?
wrote on 3 Dec 2019, 20:05 last edited by Please_Help_me_D 12 Mar 2019, 22:55@SGaist Seems to me that partially problem was solved.
I added to the main file:#include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkInteractionStyle);
I found it here link_1 and here link_2. I can run it only if both PATH and Path variables include path to VTK/bin and "Pure system environment" is checked off.
Here is the result:
As you can see I get some error and warning. What do you think of this?
Here is full error:
ERROR: In D:\Qt\Downloaded\VTK-8.2.0\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 734
vtkWin32OpenGLRenderWindow (000000000016F1C0): We have determined that your graphics system is an Intel SandyBridge based system. These systems only partially support VTK. If you encounter any issues please make sure your graphics drivers from Intel are up to date. -
That looks like a build problem because it tries to write file somewhere it should not.
Did you do that in the Run part only ?
wrote on 4 Dec 2019, 01:42 last edited by@SGaist I use laptop and I have two videocards: Intel (native) and Nvidia (external). The error appears only when I run the app with native Intel videocard. If I run it with Nvidia then there is no error. So I think the question is solved. Thank you one more time :)
-
That looks like a build problem because it tries to write file somewhere it should not.
Did you do that in the Run part only ?
wrote on 6 Dec 2019, 00:06 last edited by@SGaist I'm sorry for disturbing you but don't you know why some of VTK examples work and other doesn't?
For example I can run ex1(works) and ex2(works) but I can't launch ex3(not_work)
The output from my app is:
03:02:26: Strart C:\Users\Tasik\Documents\Qt_prj\build-untitled-Desktop_Qt_5_12_5_MSVC2017_64bit-Release\release\untitled.exe ...
03:02:26: Application unexpectly stopped.
03:02:26: The process was forced to stop.
03:02:26: C:/Users/Tasik/Documents/Qt_prj/build-untitled-Desktop_Qt_5_12_5_MSVC2017_64bit-Release/release/untitled.exe crashed. -
Do you have the same issue in Debug mode ?
-
wrote on 7 Dec 2019, 09:04 last edited by
@SGaist yes, the behavior is the same in release and debug mode
-
In that case, run your application using the debugger. It will allow you to gather more information on what is going on.
-
In that case, run your application using the debugger. It will allow you to gather more information on what is going on.
wrote on 8 Dec 2019, 01:07 last edited by@SGaist I can't put a "break point" beacause in this case I get the error: "cdb stopped".
If I just run app in debug mode I get the application output:04:05:17: C: \ Users \ Tasik \ Documents \ Qt_prj \ build-VTK-Desktop_Qt_5_12_5_MSVC2017_64bit-Debug \ debug \ VTK.exe starts ... 04:05:17: The program ended unexpectedly. 04:05:17: The process was completed forcibly. 04:05:17: C: /Users/Tasik/Documents/Qt_prj/build-VTK-Desktop_Qt_5_12_5_MSVC2017_64bit-Debug/debug/VTK.exe failed.
and compiler output:
04:05:17: Steps are being carried out for the VTK project ... 04:05:17: Settings have not changed, the qmake stage is skipped. 04:05:17: It starts: "C: \ Qt \ Tools \ qtcreator-4.10.2 \ bin \ jom.exe" C: \ Qt \ Tools \ qtcreator-4.10.2 \ bin \ jom.exe -f Makefile.Debug 04:05:17: The process "C: \ Qt \ Tools \ qtcreator-4.10.2 \ bin \ jom.exe" completed successfully. 04:05:17: Elapsed time: 00:00.
-
How did you install the debugger ?
-
wrote on 8 Dec 2019, 23:56 last edited by
@SGaist I don't know exactly but I think it was installed with Visual Studio 2017. Isn'it?
-
@SGaist I don't know exactly but I think it was installed with Visual Studio 2017. Isn'it?
@Please_Help_me_D said in Add VTK library to Qt project:
Isn'it?
No, the debugger in Visual Studio can't be used outside of Visual Studio.
You need to install Debugging Tools for Windows/CDB.
See https://doc.qt.io/qtcreator/creator-debugger-engines.html -
@Please_Help_me_D said in Add VTK library to Qt project:
Isn'it?
No, the debugger in Visual Studio can't be used outside of Visual Studio.
You need to install Debugging Tools for Windows/CDB.
See https://doc.qt.io/qtcreator/creator-debugger-engines.htmlwrote on 9 Dec 2019, 15:55 last edited by@jsulm thank you
My debugger is in folder: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe
Then I don't know how it was installed. It was already installed by the time when I installed Qt. Should I install some new debugger?
By the way in most application I can set a breakpoint and work with debugger. But in this case it doesn't work. -
wrote on 9 Dec 2019, 16:20 last edited by
I set up CDB path as it said in link text but still doesn't work.
Am I right that if my CDB installed properly then it should run my app and if some problem occurs then an error should appear that more detailed describes my problem? -
Did you check that your debugger is for the right architecture ?
-
wrote on 9 Dec 2019, 19:22 last edited by
@SGaist I think so. There are several of them for different compilators and architectures and I think Qt choses the right one for my x64 application
-
Did you check that it's the correct one that is selected for the kit you are using ?
13/42