<div dir="ltr">This is not your fault. It is our (vtk developers) fault.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 4:46 PM, Brooke Steele <span dir="ltr"><<a href="mailto:bnsteel@gmail.com" target="_blank">bnsteel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well, I'm not a CMake guru.<div><br></div> I am not smart enough to figure out how to make CMake include all of my settings from my existing project, so I emulated the output of using CMake with VTK6.0 to make a VTK only VS project, and ported what I found to my existing VS project.<div>
<br><div><div>I couldn't find sufficient description of what I was "supposed" to do online, so I had to wing it. </div><div><br></div><div> My project works, so I feel like the manual includes were the right thing for me. </div>
<span class="HOEnZb"><font color="#888888">
</font></span></div></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Brooke</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 3:49 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You should not have to manually include any directories in VS.<br><br></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 3:33 PM, Brooke Steele <span dir="ltr"><<a href="mailto:bnsteel@gmail.com" target="_blank">bnsteel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Joseph,<div><br></div><div>I recently was successful in getting VTK6.0 working with my VS2008 project. </div>
<div><br></div><div>What I had to do was include the headers in BOTH the source distribution AND the CMake build directory. It would build fine with just the source headers, since that is where the definitions are, but it wouldn't run because the macro/module definitions are in the build directory.</div>
<div><br></div><div> There are 50 vtk include directories in my project, half from the source and half from the build.</div><span><font color="#888888"><div><br></div><div>Brooke</div></font></span></div><div>
<div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 23, 2013 at 1:55 PM, Joseph Melnyk <span dir="ltr"><<a href="mailto:JMelnyk@pile.com" target="_blank">JMelnyk@pile.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I built VTK in debug mode and got a bit more information. The debugger doesn't trace into VTK, it just outputs the following to the output console:<br>
Generic Warning: In ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderer.cxx, line 47<br>
Error: no override found for 'vtkRenderer'.<br>
Generic Warning: In ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderWindow.cxx, line 35<br>
Error: no override found for 'vtkRenderWindow'<br>
<br>
Which are the respective lines:<br>
vtkAbstractObjectFactoryNewMacro(vtkRenderer)<br>
vtkAbstractObjectFactoryNewMacro(vtkRenderWindow)<br>
<br>
This occurs when I try to execute the following line:<br>
vtkSmartPointer<vtkContextView> view = vtkSmartPointer<vtkContextView>::New();<br>
<br>
Note that I am doing the autoinit as follows:<br>
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)<br>
#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)<br>
<br>
This is defined within the header file of any class using VTK.<br>
<div><br>
<br>
<br>
<br>
<br>
<br>
From: Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>]<br>
</div>Sent: Tuesday, July 23, 2013 11:35 AM<br>
To: Joseph Melnyk<br>
Cc: Robert Maynard; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<div><div>Subject: Re: [vtkusers] VTK 6.0 with Visual Studio<br>
<br>
If you build your VTK Debug you you should see more.<br>
<br>
On Tue, Jul 23, 2013 at 11:24 AM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com" target="_blank">JMelnyk@pile.com</a>> wrote:<br>
Thanks for the suggestion. I can't trace directly into the vtk dll's for more information. The stack trace just tells me where they've failed in the .h file, which is just the New() call.<br>
<br>
As I said, some objects will instantiate and can be used just fine. For example, I can use vtkTable and vtkFloatArray just fine but then when I try to use vtkContextView or vtkInteractorStyleTrackballCamera, the New() event fails.<br>
<br>
Regards<br>
Joseph Melnyk<br>
<br>
<br>
<br>
> -----Original Message-----<br>
> From: Robert Maynard [mailto:<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>]<br>
> Sent: Tuesday, July 23, 2013 9:14 AM<br>
> To: Joseph Melnyk<br>
> Cc: <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
> Subject: Re: [vtkusers] VTK 6.0 with Visual Studio<br>
><br>
> Are you able to provide more information on the exact violation exceptions<br>
> with a back trace? Access violations can occur when you call methods on a<br>
> NULL object, so it could be a case that a object factory that is NULL is being<br>
> asked to create classes.<br>
><br>
> On Mon, Jul 22, 2013 at 2:45 PM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com" target="_blank">JMelnyk@pile.com</a>> wrote:<br>
> > I'm attempting to port an existing code base from VTK 5.10 to 6.0. This<br>
> code base has existed and worked happily with VTK 5.x for a few years now,<br>
> being built with Visual Studio 2008. When I began the port to 6.0, I followed<br>
> the migration guide found here:<br>
> <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide</a> and the code builds<br>
> and links just fine. However, when I run it, I'm getting access violation<br>
> exceptions (attempts to read/write protected memory) when I try<br>
> instantiating with New(). Researching further, I see that this problem is<br>
> mentioned here:<br>
> <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_de" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_de</a><br>
> fines HOWEVER I'm not getting NULL objects with the New() call, I'm getting<br>
> exceptions. Furthermore, it doesn't happen with every VTK object; some<br>
> instantiate and can be used just fine. Nonetheless, I tried the suggestions at<br>
> the second link, regarding definition of VTK AUTOINIT, and they proved<br>
> fruitless. So I'm currently at a loss...<br>
> ><br>
> > For what it's worth, I'm building VTK with CMAKE and the only options I'm<br>
> changing from the default configuration are the following:<br>
> > - build shared libs<br>
> > - don't build TESTING<br>
> > - set custom install directory<br>
> ><br>
> > Thanks for your time; any help would be greatly appreciated...<br>
> > Joseph Melnyk<br>
> ><br>
> > __Scanned by MessageLabs<br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the VTK FAQ at:<br>
> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
> _Scanned by MessageLabs<br>
<br>
__Scanned by MessageLabs<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
<br>
_Scanned by MessageLabs<br>
<br>
__Scanned by MessageLabs<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>