[Insight-users] Building DCMTK VS2010 for ITK with CMAKE error LNK 2001, 2005, 2038

Matt McCormick matt.mccormick at kitware.com
Thu Oct 10 23:06:54 EDT 2013


Hi Jose,

It would be worth a try to only build and install in Release mode.

Thanks,
Matt

On Thu, Oct 10, 2013 at 4:52 PM, Jose Ignacio Prieto
<joseignacio.prieto at gmail.com> wrote:
> Hi All,
> I know this is a DCMTK issue rather than ITK, but maybe some of you have
> tried this (and experienced the frustration).
> I was developing in linux using both libs but I had to move to windows
> because of a third lib. I haven't been able to build correctly my project
> now.
> I am using DCMTK and ITK head.
> 1. First I generate DCMTK project with cmake. I set folder "A" for git
> source, "B" for build code and "C" for install, in a tree like c:\A c:\B
> c:\C. Then configure for build type Debug;Release, generate using MSVC 10
> x64 native compiler.
> 2. Configure and generate using default conf.
> 3. In VS2010 I build entire solution in debug, then build "install", then
> build entire solution in release, then build "install"
> 4. I configure ITK, setting on ITK_USE_DCMTK and ITK_USE_IODCMTK, then
> USE_SYSTEM_DCMTK, reconfigure and point to previous folder c:\B
> 5. Generate
> 6. In VS2010 I build entire ITK solution in debug, then build "install",
> then build entire ITK solution in release, then build "install"
> 7. I run cmake for my own project ( that already worked on linux). On that
> CMakeLists I don't have any reference to DCMTK, but when I check the
> includes in the .h files I can see the dcmtk code.
>
> I had about 25 errors LKN2001 and LNK2019. I could read that it was
> something on the order of the libraries link:
>
> , I tried to add ofstd on top of the classes I use. Didn't work. I read on
> some forum that there could be a difference setting off
> DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS  df but it showed about 160 LNK2038
> errors: dcmjpeg.lib(djdecode.obj):-1: error: LNK2038: mismatch detected for
> '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in
> epxMainWindow.cxx.obj
>
>
> http://forum.dcmtk.org/viewtopic.php?t=1285
> http://www.itk.org/pipermail/insight-developers/2013-February/022462.html
> http://forum.dcmtk.org/viewtopic.php?f=4&t=35
> http://forum.dcmtk.org/viewtopic.php?f=4&t=36
>
> I don't know what else to try,
>
> Thanks
>
>
> --
> José Ignacio Prieto
> celular(nuevo): 94348182
>
> _____________________________________
> 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://www.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://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list