OK, I've commented out that redefinition. That should solve the problem for MSVC.
Från: Philip Tresadern <Philip.Tresadern@...>
Till: Brandon Mayer <b.mayer1@...>; Ozge Can Ozcanli <ozgecanozcanli@...>
Kopia: "vxl-users@..." <vxl-users@...>
Skickat: onsdag, 14 november 2012 14:09
Ämne: Re: [Vxl-users] vnl linking errors
I think the source of this is in vnl_math.cxx and particularly the #define on line 20, which only applies to MSVC:
#ifdefined(VCL_VC) || defined(__MINGW32__)
// I don't think we need this, because <ieeefp.h> is available -- fsm
# include<float.h> // for 'isnan' and 'finite'
// # define isnan _isnan
# definefinite _finite
# definefinitef _finite
# definefinitel _finite
# defineisnan _isnan
In particular, see the comment from fsm and the previously commented out macro for isnan (which has since reappeared).
My guess is that this macro did not apply when the function was named ‘vnl_math_isnan’ whereas the namespaced ‘isnan’ is now being redirected to _isnan within float.h, thus causing problems. Removing the #define avoids the linker errors for me.
From:Brandon Mayer [mailto:b.mayer1@...]
Sent: 29 October 2012 17:42
To: Ozge Can Ozcanli
Subject: Re: [Vxl-users] vnl linking errors
I'm having the same problem using Visual Studio 2010.
I commented out the call to vnl_math::isnan() in vnl_matrix<T>::has_nans() and then everything compiles and links though I haven't found a real solution yet.
On Mon, Oct 29, 2012 at 12:02 PM, Ozge Can Ozcanli <ozgecanozcanli@...> wrote:
My platform is Windows 7, using MS Visual Studio 2008.
trying to build vnl_test_all and get errors of the following sort:
vnl.lib(vnl_matrix_fixed+double.4.4-.obj) : error LNK2001: unresolved external symbol "bool __cdecl vnl_math::isnan(double)" (?isnan@...)
recently updated all of vxl and got the vnl_math namespace change.
any idea how to resolve this?