[ITK-dev] problems with programs crashing -- potentially due to multiple versions of ITK?
Dženan Zukić
dzenanz at gmail.com
Fri Apr 29 16:32:24 EDT 2016
Hi Tim,
the classic solution for this is to build ITK (and VTK) as static
libraries. I have a dozen of different ITK versions on my computer and they
coexist nicely.
Regards
On Fri, Apr 29, 2016 at 3:51 PM, Matt McCormick <matt.mccormick at kitware.com>
wrote:
> > Thanks for the quick reply. I assumed that's what I was doing. Is it
> wrong
> > to have two versions of ITK with different configurations on one
> computer,
> > use the ITK_DIR variable in CMake to link Program A to one version and
> > Program B to another version, and expect them both to run?
>
> It is OK to have two versions of ITK with different configurations, A
> and B, if Program A only links to ITK A and Program B only links to
> ITK B. If ITK is built with shared libraries, though, and Program B
> finds ITK A libraries at runtime, it may crash. To inspect what
> libraries an executable is finding at runtime, try Dependency Walker:
>
> http://www.dependencywalker.com/
>
> HTH,
> Matt
>
> On Fri, Apr 29, 2016 at 3:04 PM, Tim Jackson <tj.jackson1226 at gmail.com>
> wrote:
> > Hi Matt,
> >
> > Thanks for the quick reply. I assumed that's what I was doing. Is it
> wrong
> > to have two versions of ITK with different configurations on one
> computer,
> > use the ITK_DIR variable in CMake to link Program A to one version and
> > Program B to another version, and expect them both to run?
> >
> > Best,
> > Tim
> >
> > On Fri, Apr 29, 2016 at 2:49 PM, Matt McCormick <
> matt.mccormick at kitware.com>
> > wrote:
> >>
> >> Hi Tim,
> >>
> >> To avoid issues, everything that is linked together should be built
> >> with the same compiler and the same version of ITK.
> >>
> >> HTH,
> >> Matt
> >>
> >> On Fri, Apr 29, 2016 at 2:43 PM, Tim Jackson <tj.jackson1226 at gmail.com>
> >> wrote:
> >> > Hi all,
> >> >
> >> > I've been making programs that use filters from ITK for a couple years
> >> > now.
> >> > Recently, I downloaded the newest installation of ITK because I
> wanted a
> >> > version that had the SCIFIO module, in order to read Nikon .nd2
> images.
> >> >
> >> > Weird things have now started happening with programs that previously
> >> > had no
> >> > problems. Everything compiles, but programs linked to one version of
> >> > ITK
> >> > crash every time an image reader updates in Release (but not Debug
> >> > mode),
> >> > and programs linked to another version of ITK can read images
> >> > successfully,
> >> > but inevitably crash when another filter updates (for example, a
> >> > registration filter). These programs all run successfully on other
> >> > computers that have only one installation of ITK.
> >> >
> >> > I'm guessing that these programs are having linking problems, but I'm
> >> > not
> >> > really sure how to correct it. I tried deleting every version of ITK
> I
> >> > have
> >> > on this computer and downloading a new version and starting from
> >> > scratch,
> >> > but that just made everything worse.
> >> >
> >> > In case this information helps, I used CMake 2.8.10.2 and built
> >> > everything
> >> > with Visual Studios 2012. My older version of ITK was 4.8.1 and my
> new
> >> > version with the SCIFIO module was 4.9.0.
> >> >
> >> > Thanks for your help,
> >> > Tim
> >> >
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Kitware offers ITK Training Courses, for more information visit:
> >> > http://kitware.com/products/protraining.php
> >> >
> >> > Please keep messages on-topic and check the ITK FAQ at:
> >> > http://www.itk.org/Wiki/ITK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://public.kitware.com/mailman/listinfo/insight-developers
> >> >
> >
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20160429/e015ae5e/attachment.html>
More information about the Insight-developers
mailing list