[Insight-users] Problems in building InsightApplications
Niranjan Joshi
njoshi at robots.ox.ac.uk
Mon May 14 13:59:28 EDT 2007
Hello Luis,
thanks for your suggestions. I build all the toolkits in Debug mode once
again (such that their binary directories
will not have anything but Debug build files). And then tried to build
the applications but the result is same
as the last time. It still gives the same problem while running the
executable:
Run-Time Check Failure #0 - The value of ESP was not properly saved
across a function call. This is usually a result
of calling a function declared with one calling convention with a
function pointer declared with a different calling convention.
Do you think there is any version mismatch between the toolkits I am using?
Thanks for the help.
Niranjan.
Luis Ibanez wrote:
>
> Hi Niranjan,
>
>
> The run time error that you are experiencing is usually the consequence
> of forcing the linker to mix code that has been built for different
> compilation modes. For example, mixing Release code with Debug code.
>
>
> Please make sure that you use a *SINGLE* compilation mode for the
> entire process:
>
>
> That is,
>
> build FLTK for Debug, and
> build ITK for Debug, and
> build VTK for Debug, and
> build InsightApplications for Debug
>
>
> OR
>
> build FLTK for Release, and
> build ITK for Release, and
> build VTK for Release, and
> build InsightApplications for Release
>
>
>
> *DO NOT* mix Debug and Release (or any other compilation mode) builds.
>
> Visual Studio will offer you the stupid option of FORCING the link.
> Do not accept that option. It results in a mixture of Windows debug
> and release libraries that makes your code crash at run time.
>
>
>
> Regards,
>
>
>
> Luis
>
>
> -------------------
> Niranjan Joshi wrote:
>> Hello,
>>
>> I have been trying to build InsightApplications on a Windows machine
>> with VC++ and getting following problems (mainly related with FLTK).
>>
>> InsightApplications version 2.8.1
>> FLTK version 1.1.7
>> ITK version 2.8.1
>> VTK version 5.0.3
>>
>> 1. If I use "visualnet" folder in FLTK to build it, whenever I build
>> InsightApplications (mainly SNAP), there are
>> linking errors related with JPEG and PNG libraries:
>> InsightSNAP error LNK2019: unresolved external symbol
>> _jpeg_read_scanlines referenced in function "public: __thiscall
>> Fl_JPEG_Image::Fl_JPEG_Image(char const *)"
>> (??0Fl_JPEG_Image@@QAE at PBD@Z)
>>
>> There are many such errors, I am just providing one as an example.
>>
>> 2. If I use CMAKE to build FLTK (in which case I can turn off the
>> JPEG and PNG library flags), I get the following
>> problem:
>>
>> In this case applications build properly but while running the
>> executable, it gives the following error and program crashes:
>>
>> Run-Time Check Failure #0 - The value of ESP was not properly saved
>> across a function call. This is usually a result
>> of calling a function declared with one calling convention with a
>> function pointer declared with a different calling convention.
>>
>>
>> any ideas about what is going wrong?
>>
>> thanks a lot for your help.
>>
>> Niranjan.
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
More information about the Insight-users
mailing list