[vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)

KOZLOVSKY Nicolas nicolas.kozlovsky at fr.thalesgroup.com
Tue Feb 23 03:38:01 EST 2016


Hello All

I just find the line that saves my project from being compiled with cmake ;-) in a mail from D. E. DeMarle (thanks a lot)

For vtk < 7.0   : #define vtkRenderingContext2D_AUTOINIT 1(vtkRenderingContextOpenGL)
For vtk >= 7.0 : #define vtkRenderingContext2D_AUTOINIT 1(vtkRenderingContextOpenGL2)




De : vtkusers [mailto:vtkusers-bounces at vtk.org] De la part de KOZLOVSKY Nicolas
Envoyé : vendredi 29 janvier 2016 08:47
À : vtkusers at vtk.org
Objet : Re: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)

Hi all
Just to be sure, I tried with VTK 6.1.0 and it worked perfectly well with qmake compilation. I have tried also with VTK7.0 rc2, but same results as with VTK 6.3 ==> runtime error



De : KOZLOVSKY Nicolas
Envoyé : mardi 26 janvier 2016 09:21
À : vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Objet : RE: Error at runtime using qmake for building project (vtkContextDevice2D)

Hi
Thanks for the files, I looked to the files and I saw that we did the same things for openglRenderer initialization.

The difference I saw is the use of the render :

QVTKWidget *vtkWidget = new QVTKWidget;
setCentralWidget(vtkWidget);

vtkSmartPointer<vtkContextView> contextView = vtkSmartPointer<vtkContextView>::New();
contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow());
contextView->GetRenderWindow()->SetSize(800, 800);
this->resize(800, 800);

In fact when in debug mode, the run stops in file vtkContextActor.cxx in function RenderOverlay

this->Context->GetDevice()->SetViewportSize(vtkVector2i(size));

It seems that the context is not initialized.

De : MOUSSAUD David 244079 [mailto:David.MOUSSAUD at cea.fr]
Envoyé : lundi 25 janvier 2016 14:18
À : KOZLOVSKY Nicolas; vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Objet : RE:Error at runtime using qmake for building project (vtkContextDevice2D)


Hi Nicolas,

A couple weeks ago, i have joined my qmake project to an other thread (http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html)



Here it is again attached in this email.

I'm using also vtk 6.3.



Regards,

David.



________________________________
De : vtkusers [vtkusers-bounces at vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky at fr.thalesgroup.com]
Envoyé : lundi 25 janvier 2016 12:57
À : vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Objet : [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)
Hi all

I try to use QVTKWidget in a big project using qmake for building.
Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 :

In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27
Error: no override found for 'vtkContextDevice2D'.

I read a lot about this and put in the main.cpp :

#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL)
VTK_MODULE_INIT(vtkInteractionStyle)

I have always the same error at runtime.
I try also to add this directive to .pro file:

DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\""

But again same error at runtime.

If now I build the project with cmake, I have no problem everything is running fine.
How can I build with qmake ???

Thanks for any clues

Nicolas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160223/2351fcd4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: M  Nicolas KOZLOVSKY.vcf
Type: text/x-vcard
Size: 1589 bytes
Desc: M  Nicolas KOZLOVSKY.vcf
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160223/2351fcd4/attachment.vcf>


More information about the vtkusers mailing list