<br>Hi Mote,<br><br>You need to build in the *SAME* configuration mode,<br>both ITK *and* your application.<br><br>Please do the following:<br><br> 1) Load the ITK solution file into Visual Studio.<br> 2) Select Configuration = Release<br>
3) Build ITK<br> (verify that you get an ITKCommon.lib file<br> in the directory: ITKBINARY/bin/Release)<br> 4) Load your project solution into Visual Studio<br> 5) Select Configuration = Release<br> 6) Build your application<br>
<br><br> Regards,<br><br><br> Luis<br><br> <br>-----------------------------------------------<br><div class="gmail_quote">On Wed, Sep 9, 2009 at 10:41 AM, motes motes <span dir="ltr"><<a href="mailto:mort.motes@gmail.com">mort.motes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am using Visual Studio 2008. I have tried:<br>
<br>
Build -> Configuration Manager ...<br>
<br>
And from there chosing "Release". But when I compile I get the error:<br>
<br>
Error 12 fatal error LNK1181: cannot open input file 'ITKCommon.lib'<br>
<br>
This error does not pop up if I choose the "Debug" configuration (default).<br>
<br>
In a previous post I was told to use cmake to build a release build.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Wed, Sep 9, 2009 at 4:37 PM, Luis Ibanez<<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br>
><br>
> Hi Motes,<br>
><br>
> In Windows you can not select the compilation mode from CMake.<br>
><br>
> You have to do it from inside Visual Studio,<br>
> after you load the ITK solution file,<br>
> by selecting the configuration mode.<br>
><br>
> What version of Visual Studio do you use ?<br>
><br>
><br>
> Luis<br>
><br>
><br>
> ---------------------------------------------------------------------------------------------<br>
> On Wed, Sep 9, 2009 at 10:29 AM, motes motes <<a href="mailto:mort.motes@gmail.com">mort.motes@gmail.com</a>> wrote:<br>
>><br>
>> Ok but how do I make a release build with cmake?<br>
>><br>
>> After chosing "Configure" the only thing related to "Release" is:<br>
>><br>
>> CMAKE_CXX_FLAGS_RELEASE /MD /O2 /Ob2 /D NDEBUG<br>
>><br>
>> I thought I could check it like "Examples" and "Testing".<br>
>><br>
>><br>
>><br>
>> On Wed, Sep 9, 2009 at 3:37 PM, John Drescher<<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>> wrote:<br>
>> >> In Visual Studio you must select "Release" from the drop down box on<br>
>> >> the toolbar to perform an optimized compilation. Using a "Release"<br>
>> >> build can improve performance 10-200%.<br>
>> >><br>
>> ><br>
>> > In my testing with a debug versus release (under visual studio) it is<br>
>> > much worse than that in debug mode. I mean for a 3D median filter of a<br>
>> > CT volume of 512x512x384. In release mode this completes in less than<br>
>> > 30 seconds. In debug mode it takes around 30 minutes.<br>
>> ><br>
>> > John<br>
>> ><br>
>> _____________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div></blockquote></div><br>