<div dir="ltr"><div dir="ltr"><div>Maybe try starting with something like this</div><div><br></div><div><a href="https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/">https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/</a></div><div><br></div><div>Get that built and running on your system. Then edit that to add in the openvr codes.</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 17, 2018 at 5:59 AM,  <span dir="ltr"><<a href="mailto:deubel@dornheim-medical-images.com" target="_blank">deubel@dornheim-medical-images.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u><div><div style="font-family:arial,sans-serif;font-size:13px">Dear Ken,<br>Unfortunately, this still doesn't work on the current master(pulled some minutes ago). This is my current CMakeLists.txt: <a href="https://pastebin.com/J2UyX6tr" target="_blank">https://pastebin.com/J2UyX6tr</a><br><br>The error looks pretty much the same as before:<br>[ 50%] Linking CXX executable vtkOpenVRHelloWorld<br>CMakeFiles/<wbr>vtkOpenVRHelloWorld.dir/<wbr>CylinderRenderingProperties.<wbr>cxx.o: In function `vtkRenderingOpenGL2_AutoInit:<wbr>:~vtkRenderingOpenGL2_<wbr>AutoInit()':<br>CylinderRenderingProperties.<wbr>cxx:(.text._<wbr>ZN28vtkRenderingOpenGL2_<wbr>AutoInitD2Ev[_<wbr>ZN28vtkRenderingOpenGL2_<wbr>AutoInitD5Ev]+0x1): undefined reference to `vtkRenderingOpenVR_AutoInit_<wbr>Destruct()'<br>CMakeFiles/<wbr>vtkOpenVRHelloWorld.dir/<wbr>CylinderRenderingProperties.<wbr>cxx.o: In function `_GLOBAL__sub_I_main':<br>CylinderRenderingProperties.<wbr>cxx:(.text.startup+0x340): undefined reference to `vtkRenderingOpenVR_AutoInit_<wbr>Construct()'<br>collect2: error: ld returned 1 exit status<br>CMakeFiles/<wbr>vtkOpenVRHelloWorld.dir/build.<wbr>make:149: recipe for target 'vtkOpenVRHelloWorld' failed<br>make[2]: *** [vtkOpenVRHelloWorld] Error 1<br>CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/<wbr>vtkOpenVRHelloWorld.dir/all' failed<br>make[1]: *** [CMakeFiles/<wbr>vtkOpenVRHelloWorld.dir/all] Error 2<br>Makefile:83: recipe for target 'all' failed<br>make: *** [all] Error 2<br><br>Here you can find the verbose make output: <a href="https://pastebin.com/uKkPwWJP" target="_blank">https://pastebin.com/uKkPwWJP</a><br><br>What is AutoInit?<br><br>Do you have another idea what to try?<br><br>Best wishes,<br>Max.D.<br><br>9. Oktober 2018 20:55, "Ken Martin" <<a href="mailto:ken.martin@kitware.com?to=%22Ken%20Martin%22%20%3Cken.martin@kitware.com%3E" target="_blank">ken.martin@kitware.com</a>> schrieb:<br> <blockquote><div><div> <div dir="ltr"><div dir="ltr"> <div>Maybe try something like the following in your CMakeLists. It works for me without adding any autoinit stuff.</div> <div></div> <div>find_package(VTK REQUIRED)<br>vtk_module_config(VTK<br>vtkCommonCore<br>vtkCommonDataModel<br>vtkFiltersGeneral<br>vtkIOImage<br>vtkIOXML<br>vtkInteractionStyle<br>vtkRenderingOpenGL2<br>vtkRenderingOpenVR<br>)<br>include(${VTK_USE_FILE})</div> <div></div> </div></div> <div> <div>On Tue, Oct 9, 2018 at 12:27 PM, <span dir="ltr"><<a rel="external nofollow noopener noreferrer" href="mailto:deubel@dornheim-medical-images.com" target="_blank">deubel@dornheim-medical-<wbr>images.com</a>></span> wrote:<br><br> <blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,sans-serif;font-size:13px">Dear Ken,<br>I tried to paste those lines in like that: <a rel="external nofollow noopener noreferrer" href="https://pastebin.com/SRmt1GNp" target="_blank">https://pastebin.com/SRmt1GNp</a><br><br>More fixing seems to be needed, as I am getting a very similar (but longer) linker error message:<br><br>[100%] Linking CXX executable vtkOpenVRHelloWorld<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenVR_ModuleInit<wbr>::vtkRenderingOpenVR_<wbr>ModuleInit()':<br>/media/max/home/max/vtkOpenVRH<wbr>elloWorld/CylinderRenderingPro<wbr>perties.cxx:5: undefined reference to `vtkRenderingOpenVR_AutoInit_C<wbr>onstruct()'<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenVR_ModuleInit<wbr>::~vtkRenderingOpenVR_<wbr>ModuleInit()':<br>/media/max/home/max/vtkOpenVRH<wbr>elloWorld/CylinderRenderingPro<wbr>perties.cxx:5: undefined reference to `vtkRenderingOpenVR_AutoInit_D<wbr>estruct()'<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenGL2_AutoInit:<wbr>:vtkRenderingOpenGL2_AutoInit(<wbr>)':<br>/media/max/home/max/build-vtk-<wbr>current-master-Desktop_Qt_5_11<wbr>_2_GCC_64bit-Default/Rendering<wbr>/OpenGL2/vtkRenderingOpenGL2Mo<wbr>dule.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_C<wbr>onstruct()'<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenGL2_AutoInit:<wbr>:~vtkRenderingOpenGL2_AutoInit<wbr>()':<br>/media/max/home/max/build-vtk-<wbr>current-master-Desktop_Qt_5_11<wbr>_2_GCC_64bit-Default/Rendering<wbr>/OpenGL2/vtkRenderingOpenGL2Mo<wbr>dule.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_D<wbr>estruct()'<br>collect2: error: ld returned 1 exit status<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/build.make:149: recipe for target 'vtkOpenVRHelloWorld' failed<br>make[2]: *** [vtkOpenVRHelloWorld] Error 1<br>CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorl<wbr>d.dir/all' failed<br>make[1]: *** [CMakeFiles/vtkOpenVRHelloWorl<wbr>d.dir/all] Error 2<br>Makefile:83: recipe for target 'all' failed<br>make: *** [all] Error 2<br><br>Do you a hint on what to try next?<br><br>Best wishes,<br>Max.D.<br><br><br><br>9. Oktober 2018 15:12, "Ken Martin" <<a rel="external nofollow noopener noreferrer" href="mailto:ken.martin@kitware.com?to=%22Ken%20Martin%22%20%3Cken.martin@kitware.com%3E" target="_blank">ken.martin@kitware.com</a>> schrieb:<blockquote><div><div> <div dir="ltr"> <div>You may need</div> <div></div> <div>#include "vtkAutoInit.h"<br>VTK_MODULE_INIT(vtkRenderingOp<wbr>enGL2)</div> <div> <div>VTK_MODULE_INIT(vtkRenderingOp<wbr>enVR)</div> <div></div> </div> <div>or similar. Give that a shot - Ken</div> <div></div> <div></div> </div> <div> <div>On Tue, Oct 9, 2018 at 7:55 AM, <span dir="ltr"><<a rel="external nofollow noopener noreferrer" href="mailto:deubel@dornheim-medical-images.com" target="_blank">deubel@dornheim-medical-image<wbr>s.com</a>></span> wrote:<br> <blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,sans-serif;font-size:13px"> <p>Dear Ken,<br>I finally managed to get my code building and running on both Windows and Linux.<br>You can find it here:<br><a rel="external nofollow noopener noreferrer" href="https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip" target="_blank">https://transfer.sh/gJ1Sg/vtkO<wbr>penVRHelloWorld.zip</a><br><br>Unfortunately, it doesn't work with the latest VTK-Version from <a rel="external nofollow noopener noreferrer" href="https://gitlab.kitware.com/vtk/vtk" target="_blank">https://gitlab.kitware.com/vtk<wbr>/vtk</a><br>After some testing, I found the first commit it doesn't build with: <a rel="external nofollow noopener noreferrer" href="https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd79488f919cc" target="_blank">https://gitlab.kitware.com/vtk<wbr>/vtk/commit/61bc6b5b4b8f0d2d11<wbr>1f6c10af3dd79488f919cc</a><br>(VTK builds, but my program doesn't build with this VTK Version)<br><br>Even though I already use the vtkOpenVR* classes explicitly, it doesn't build.<br>Is there something else I have to change to make it compatible?<br><br>Make produces the following Linker error:<br><br>[ 50%] Linking CXX executable vtkOpenVRHelloWorld<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenGL2_AutoInit:<wbr>:vtkRenderingOpenGL2_AutoInit(<wbr>)':<br>/media/max/home/max/build-vtk-<wbr>current-master-Desktop_Qt_5_11<wbr>_2_GCC_64bit-Default/Rendering<wbr>/OpenGL2/vtkRenderingOpenGL2Mo<wbr>dule.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_C<wbr>onstruct()'<br>CMakeFiles/vtkOpenVRHelloWorld<wbr>.dir/CylinderRenderingProperti<wbr>es.cxx.o: In function `vtkRenderingOpenGL2_AutoInit:<wbr>:~vtkRenderingOpenGL2_AutoInit<wbr>()':<br>/media/max/home/max/build-vtk-<wbr>current-master-Desktop_Qt_5_11<wbr>_2_GCC_64bit-Default/Rendering<wbr>/OpenGL2/vtkRenderingOpenGL2Mo<wbr>dule.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_D<wbr>estruct()'<br><br>Any help would be appreciated!<br><br>Best regards,<br>Max.D.<br><br><br>4. Oktober 2018 16:10, "Ken Martin" <<a rel="external nofollow noopener noreferrer" href="mailto:ken.martin@kitware.com?to=%22Ken%20Martin%22%20%3Cken.martin@kitware.com%3E" target="_blank">ken.martin@kitware.com</a>> schrieb:</p> <blockquote><div><div> <div dir="ltr"> <div>You need to create an use an OpenVRCamera. From your code it doesn't look like you are. I doubt that is the crash but it could be.</div> <div></div> <div>Does the example work on windows? Since linux is an unknown I would think it would be best to make sure you have something working on windows, then port to linux.</div> </div> <div> <div>On Thu, Oct 4, 2018 at 9:56 AM, <span dir="ltr"><<a rel="external nofollow noopener noreferrer" href="mailto:deubel@dornheim-medical-images.com" target="_blank">deubel@dornheim-medical-image<wbr>s.com</a>></span> wrote:<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div><div style="font-family:arial,sans-serif;font-size:13px">Hey Guys,<br>Has anyone of you been able to use the vtkOpenVR classes on Linux?<br>I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to run the HelloWorld Example of VTK modified for VR, I encounter a segmentation fault.<br>You can find the code I used here: <a rel="external nofollow noopener noreferrer" href="https://pastebin.com/gjsvKy58" target="_blank">https://pastebin.com/gjsvKy58</a><br>The whole project with binary and core dump can be found here: <a rel="external nofollow noopener noreferrer" href="https://transfer.sh/6vONY/build.zip" target="_blank">https://transfer.sh/6vONY/buil<wbr>d.zip</a><br><br>Do you have any suggestions on how to get this working?<br><br>Thanks in advance!<br><br>Best regards,<br>Max.Deubel</div></div> <br>______________________________<wbr>_________________<br>Powered by <a rel="external nofollow noopener noreferrer" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a rel="external nofollow noopener noreferrer" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a rel="external nofollow noopener noreferrer" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br><br>Search the list archives at: <a rel="external nofollow noopener noreferrer" href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br><br>Follow this link to subscribe/unsubscribe:<br><a rel="external nofollow noopener noreferrer" href="https://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/vtkusers</a> </blockquote> </div> <br><br clear="all"><br><span><font color="#888888"><span><font color="#888888">--</font></span></font></span><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div> <span><font color="#888888"><span><font color="#888888">Ken Martin PhD</font></span></font></span><div><span><font color="#888888"><span><font color="#888888">Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span> </font></span></font></span></div> <span><font color="#888888"> <span><font color="#888888"> </font></span></font></span><div> <span><font color="#888888"><span><font color="#888888"><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">101 East Weaver Street</a><br><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">Carrboro, North Carolina</a><br><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">27510 USA</a></font></span></font></span><div><span><font color="#888888"><span><font color="#888888"><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you.</span></font></span></font></span></div> <span><font color="#888888"> <span><font color="#888888"> </font></span> </font></span> </div> <span><font color="#888888"> <span><font color="#888888"> </font></span> </font></span> </div></div></div></div></div> <span><font color="#888888"> <span><font color="#888888"> </font></span> </font></span> </div> </div></div></blockquote> </div></div></blockquote> <span><font color="#888888"> </font></span> </div> <br><br clear="all"><span class="HOEnZb"><font color="#888888"><br><span><font color="#888888">--</font></span><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div> <span><font color="#888888">Ken Martin PhD</font></span><div><span><font color="#888888">Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span> </font></span></div> <span><font color="#888888"> </font></span><div> <span><font color="#888888"><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">101 East Weaver Street</a><br><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">Carrboro, North Carolina</a><br><a rel="external nofollow noopener noreferrer" href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g" target="_blank">27510 USA</a></font></span><div><span><font color="#888888"><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you.</span></font></span></div> <span><font color="#888888"> </font></span> </div> <span><font color="#888888"> </font></span> </div></div></div></div></div> <span><font color="#888888"> </font></span> </font></span></div><span class="HOEnZb"><font color="#888888"> </font></span></div></div></blockquote><span class="HOEnZb"><font color="#888888"> <br> </font></span></div></div></blockquote><span class="HOEnZb"><font color="#888888"> </font></span></div><span class="HOEnZb"><font color="#888888"> <br><br clear="all"><br>--<div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span> </div> <div><a href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g">101 East Weaver Street</a><br><a href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g">Carrboro, North Carolina</a><br><a href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g">27510 USA</a><br> <div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you.</span></div> </div> </div></div></div></div></div> </font></span></div> </div></div></blockquote> <br><br><u></u><u></u> </div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>101 East Weaver Street<br>Carrboro, North Carolina<br>
27510 USA<br><br><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div></div></div>
</div>