[vtkusers] Compiling the scatterplot example without cmake
Andrew Maclean
andrew.amaclean at gmail.com
Mon Apr 2 19:04:31 EDT 2018
You are wasting your time taking this approach.
You have missing dependencies and, since you are not using CMake, you are
largely on your own sorting these out.
VTK is built using CMake and, by using CMake in your own code base, you
will ensure that all the dependencies will be automatically found for you.
If you don't want to use CMake, then this may
help: VTK/Utilities/Maintenance/WhatModulesVTK.py
Andrew
>
> ---------- Forwarded message ----------
> From: Zoltan Takacs <zozonmr at gmail.com>
> To: vtkusers at vtk.org
> Cc:
> Bcc:
> Date: Sun, 1 Apr 2018 23:16:15 +0100
> Subject:
>
> [vtkusers] Compiling the scatterplot example without cmake
> Hi,
>
> I have general question about how to compile code without using cmake. I
> have downloaded the scatterplot example because I wanted start from
> something simple. The cmake type of compilation works and the executable
> provides the plot. However when I try to compile it without cmake I get a
> segmentation fault error. This is how I modified the include list:
>
> #include <vtkVersion.h>
> #include <vtkSmartPointer.h>
> #include <vtkChartXY.h>
> #include <vtkContextScene.h>
> #include <vtkContextView.h>
> #include <vtkFloatArray.h>
> #include <vtkPlotPoints.h>
> #include <vtkRenderWindow.h>
> #include <vtkRenderWindowInteractor.h>
> #include <vtkRenderer.h>
> #include <vtkTable.h>
>
> I added the following lines:
>
> #include <vtkAutoInit.h>
>
> VTK_MODULE_INIT(vtkRenderingOpenGL);
> VTK_MODULE_INIT(vtkRenderingContextOpenGL);
> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);
> VTK_MODULE_INIT(vtkInteractionStyle);
>
> The code compiles like this and the compiler does not complain however
> when I run it then it quits with segmentation fault. My guess (and only a
> guess) that this line causes the trouble:
>
> view->GetInteractor()->Start();
>
> Why is the seg. fault happening?
>
> Thanks
>
>
>
>
>
>
--
___________________________________________
Andrew J. P. Maclean
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180403/b18e6a92/attachment.html>
More information about the vtkusers
mailing list