[vtkusers] vtk4.0 & major design problem or bug (with M$ windows)?
William A. Hoffman
billlist at nycap.rr.com
Wed Oct 31 13:12:37 EST 2001
There is no option to build vtk as one dll.
However, I found this on google groups:
>The error occurs because the 2 DLLs have been statically
>linked to the c runtime library and so have their own
>separate heaps, neither dll knowing anything about the
>existence of the other DLL's heap.
>A solution is to link to msvcrt.dll instead (in DevStudio,
>Projects->Settings, C/C++ Tab, Category:Code Generation, Use
>run-time library: Multithreaded DLL).
>Another solution is to only free memory in the module that
>allocated it!
I think that is why VTK works with the calls to GetPixelData internally.
All the regression tests use GetPixelData, and call it across dlls.
That being said, I can see where this might cause some trouble for some
users. The best thing to do would be to change this method to fill a vtkUnsignedCharArray.
vtkUnsignedCharArray* pixels = vtkUnsignedCharArray::New();
window->GetPixelData(pixels, ...);
pixels->Delete();
We will try to get that in vtk 4.0.
-Bill
At 06:23 PM 10/31/2001 +0100, Carsten Kübler wrote:
>Hello,
>
>I described our problems about two month ago (running into problems...).
>Now I tried to compile vtk4.0 but I do not find any possibility to link
>all dlls to one vtkdll.dll (using NT4.0). Is there a possibility to do
>this with cmake?
>
>Otherwise we get many problems with vtk4.0. Please try any class, which
>doesn't belong to vtkRendering and uses the method GetPixelData(...)
>from vtkRenderWindow or vtkImageWindow. We get an error during deleting
>the unsigned char array in a second dll (only with M$ windows). How do
>you solve this problem?
>
>Thanks
> Carsten Kübler
>
>
>Content-Type: text/x-vcard; charset=us-ascii;
> name="kuebler.vcf"
>Content-Description: Card for Carsten Kübler
>Content-Disposition: attachment;
> filename="kuebler.vcf"
>X-MIME-Autoconverted: from 8bit to quoted-printable by nymx01.mgw.rr.com id f9VHP6I03810
More information about the vtkusers
mailing list