[vtkusers] Difficulties migrating from vtk5.10.1 to vtk6.1.0 (MSVC++)

guzik at neubrex.jp guzik at neubrex.jp
Tue Apr 8 20:46:22 EDT 2014


Pof,

the http://www.dependencywalker.com/ is your friend in such situations. In 
general, now (vtk 6.1) the list of required dlls is quite long.

A.
_____________________
Dr. Artur Guzik

Neubrex Co., Ltd.
Sakaemachi-dori 1-1-24, Kobe, Hyogo 650-0023, Japan
tel: +81-78-334-4033
www.neubrex.com




From:   pof <jd379252 at gmail.com>
To:     "Marcus D. Hanwell" <marcus.hanwell at kitware.com>, VTK Users 
<vtkusers at vtk.org>
Date:   04/09/2014 03:46 AM
Subject:        Re: [vtkusers] Difficulties migrating from vtk5.10.1 to 
vtk6.1.0 (MSVC++)
Sent by:        "vtkusers" <vtkusers-bounces at vtk.org>



Le 08/04/2014 19:46, Marcus D. Hanwell a écrit :
> On Sun, Apr 6, 2014 at 2:48 PM, pof <jd379252 at gmail.com> wrote:
>> Hi all,
>>
>> I am (desperately)  trying to migrate my application from 5.10.1 to 
6.1.0,
>> and so far without any success.
>> I guess the problem comes from the fact that my application is compiled 
and
>> linked with MSVisualStudio, without any use of CMake (though I 
obviously use
>> CMake used to compile vtk librairies).
>>
>> Typically, I tried to follow what is mentionned on the wiki, i.e. 
adding the
>> following 2 lines at the beginning of header files that #include vtk
>> objects:
>> #define vtkRenderingCore_AUTOINIT
>> 
4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
>> #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
> I would advise you to use the new macros I added as they just need to
> be called one from your application (not defined before any header is
> included). See,
>
> 
http://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized

>
> #include <vtkAutoInit.h>
>
>   VTK_MODULE_INIT(vtkRenderingOpenGL);
>   VTK_MODULE_INIT(vtkInteractionStyle);
>
> That would initialize the vtkRenderingOpenGL and vtkInteractionStyle
> modules and you would not need to add compiler definitions on the
> command line or by hand.
>> But this does not work. I also try to add paths for include files, 
without
>> success. For instance, compiling a simple file, the compiler complains 
with:
>> fatal error C1083: Impossible to open include file :
>> 'vtkRenderWindowInteractor.h : No such file or directory
> If you build against an installed VTK then all of the includes will be
> installed to one directory, and then you just need to ensure you add
> that to the include search path. If you choose to build against the
> build tree then you must add every source and binary directory for
> every module you use and/or depend up on.
>> So I'm completely lost. Is there any available example (using MSVC++) 
of a
>> simple project successfuly migrated in vtk6.
>>
> I am not sure of any examples, but the above should make this pretty
> simple. Hopefully this helps.
>
> Marcus
Hi Markus,

I added your macro in the main header file:
     //VTK - auto initialization
     #include <vtkAutoInit.h>
     VTK_MODULE_INIT(vtkRenderingOpenGL);
     VTK_MODULE_INIT(vtkInteractionStyle);
     VTK_MODULE_INIT(vtkRenderingFreeType);
and I removed the following 2 lines from all the files I initially added 
it to:
     //#define vtkRenderingCore_AUTOINIT 
4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
     //#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)

Setting the correct install path (thanks to Artur & John, I now have the 
"VTK\include\vtk-6.1" directory), all sources files now compile.
So I did some progress.

However, I'm no there yet as it does not link.
It looks like quite some libs have changed name, and I'm not sure which 
of the new ones I should add in the dependency.
Is there a clever way to define which ones I need, or do I need to use a 
trial/error procedure?

Thanks for helping
Pof

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: 
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140409/ba093fe8/attachment.html>


More information about the vtkusers mailing list