[vtkusers] Build VTK for Windows XP 32bit on Window 7 64bit machine

Bryn Lloyd lloyd at itis.ethz.ch
Tue Jan 31 11:11:53 EST 2012


Thanks. I will try this.

I have read that in general it is bad if an application depends on 
multiple versions of the same runtime library. I have now managed to get 
it to work on the faulty computer, by changing the order of linkage 
(link vtk dlls after other ones).

I think the conflict with the VTK dlls is/was related to the following:
  - VTK was compiled using VS2010, python wrapped using a Enthought 
python (VS2008, i.e. msvcr90.dll)
  - Our application is compiled using VS2010
  - Our application links to VTK and other libraries, some of these also 
depend on msvcr90.dll
  - There are two dlls with embedded manifests for different CRT.90 
versions (9.0.2x and 9.0.3x)

I wonder what would be proper way (best practice) to resolve this. For 
instance, will changing the link order work on all machines? But that 
might be a question for Microsoft/Visual Studio.

Thanks for the help
Bryn




On 1/31/2012 4:26 PM, Robert Maynard wrote:
> You will need to install the exact runtime library versions that the
> manifest is asking for. In this case
> you will need to package the 9.0.2x and 9.0.3x runtime libraries.
>
> VTK should only require the CRT runtime library not the OpenMP or the
> MFC runtime.
>
> On Tue, Jan 31, 2012 at 5:20 AM, Bryn Lloyd<lloyd at itis.ethz.ch>  wrote:
>> Hi Gib
>>
>> Thanks for the suggestion. I have tried to analyze the problem with
>> Dependency Walker and Process Monitor.
>>
>> I also tried the cmake module CMakeVerifyManifest.cmake, which suggests
>> there might be conflicts with the runtime dependencies. Our application
>> points to two different runtime libraries 9.0.2x and 9.0.3x (from third
>> party libraries that we use, like enthought python). The computer has a
>> newer version installed 9.0.6x, but not the exact same version. I don't know
>> if this might be the issue.
>>
>> It seems that VTK does not embed the CRT dependency (manifest) in the dll.
>> Not sure if this might be needed or if there is an option in cmake to add
>> it. Maybe this is "Manifest Hell"  ;-(
>>
>> There might also be other runtime dependencies, e.g. for MFC or OpenMP. Does
>> VTK use OpenMP? But a quick search suggests it doesn't use OpenMP. Also, I
>> compiled VTK without MFC support, but our application does use MFC.
>>
>> Bryn
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 1/30/2012 10:27 PM, Gib Bogle wrote:
>>> On 31/01/2012 6:49 a.m., Bryn Lloyd wrote:
>>>> Hi
>>>>
>>>> I am having a difficult problem to solve, it seems related to VTK.
>>>>
>>>> I compiled VTK on my Windows 7 64bit machine with Visual Studio for both
>>>> 64 and 32bit windows.
>>>> Now I have used these versions in our (complex) application on different
>>>> systems. The application uses VTK in Python and in C++.
>>>>
>>>> On Windows XP 32bit the application fails to start because of some issue
>>>> during loading of the VTK dlls. Using Process Monitor I have found there
>>>> might be an issue with the manifest. Process Monitor mentions it cannot find
>>>> the manifest file of the different VTK dlls. I have no idea what is going
>>>> wrong. As I understand it, VTK embeds the manifest, so it is strange that
>>>> they are even searched/cannot be found.
>>>>
>>>> Another strange thing is that the application is working fine on one XP
>>>> 32bit machine, but is failing on another. They both have the C++ run-time
>>>> libraries installed. The system which works, has Visual Studio installed,
>>>> the other does not. No missing dll errors, just silent crash.
>>>>
>>>> If you have any ideas, I would love to hear them!
>>>>
>>> For problems like this Dependency Walker is very useful.  It will tell you
>>> about missing or inconsistent DLLs.  The issue could be the MS Visual C++
>>> runtime DLLs.
>>>
>>> Gib
>>> _______________________________________________
>>> 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
>>>
>> _______________________________________________
>> 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
>
>



More information about the vtkusers mailing list