[Insight-developers] Problems with Visual Studio 2010 linkage -- any experts?
Williams, Norman K
norman-k-williams at uiowa.edu
Fri Nov 2 17:20:15 EDT 2012
Hold the good thought.
I rebuilt DCMTK with DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS and now I'm
re-building ITK.
Ideally I'd be building DCMTK under ITK, but since other problems -- like
finding and linking to the right libraries from an ExternalProject on
Windows -- keep me from having ITK control DCMTK's build, I'm just trying
to figure out the magic recipe to get it to work as an external project.
Other fun time-wasters -- apparently the CMake 2.8.10 NMake generator
doesn't work right, or it didn't earlier today, so I'm back to using the
Visual Studio Generator. The fun never stops.
--
Kent Williams norman-k-williams at uiowa.edu
On 11/2/12 4:11 PM, "Bill Hoffman" <bill.hoffman at kitware.com> wrote:
>On 11/2/2012 4:34 PM, Williams, Norman K wrote:
>> I was using NMAKE, and I wasn't setting
>> DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS to 'Off' when I got these errors.
>>
>
>So, run nmake VERBOSE=1 to see the link/compile lines.
>> I don't know why my examination of the CMakeCache.txt files didn't turn
>>up
>> the different flags. I'd think that the
>> DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS thing would happen at config time,
>> not at build time, but I don't know.
>>
>If you do this:
>set(CMAKE_CXX_FLAGS /foo)
>
>Then the cache value of CMAKE_CXX_FLAGS will be ignored by cmake. It is
>usually a bad thing to do... :)
>
>> Windows seems really fragile in comparison to OS X and Linux. I think
>> that keeping separate Single and Multi-threaded libraries is at least 5
>> years past it's sell-by date.
>Windows is what it is. You can not mix different run time libraries.
>There are similar things that can happen on other OSs. It is just that
>MS provides a plethora of run time library options and none of them are
>compatible. It means you have to be consistent with which run time you
>use in your code. Linux and OS X have different problems, like not
>being able to run binaries built on other machines because the run time
>libraries are different. On the threaded issue, there is still a
>-ptrhead option to gcc which can cause some trouble if you mix code
>compiled with and without it...
>
>
>Anyway, none of this will help you get ITK build with VS 2010. Where
>are you now? Have you found the inconsistent flags in ITK and DCMTK yet?
>
>You want to look in the build tree of both and check out the flags.make
>and the build.make files:
>CMakeFiles/target.dir/flags.make // this will have the compile flags
>CMakeFiles/target.dir/build.make // this will have the link flags
>
>I think the link flag is what you want, something like: /MDd
>
>
>-Bill
>
>
>
>
>
>
>
>
>
>
>
>--
>Bill Hoffman
>Kitware, Inc.
>28 Corporate Drive
>Clifton Park, NY 12065
>bill.hoffman at kitware.com
>http://www.kitware.com
>518 881-4905 (Direct)
>518 371-3971 x105
>Fax (518) 371-4573
>_______________________________________________
>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://www.itk.org/mailman/listinfo/insight-developers
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list