I think the source of this is in vnl_math.cxx and particularly the #define on line 20, which only applies to MSVC:

 

#if defined(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

# define finite _finite

# define finitef _finite

#ifndef finitel

# define finitel _finite

#endif

# define isnan _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.

 

Phil.

 

 

From: Brandon Mayer [mailto:b.mayer1@gmail.com]
Sent: 29 October 2012 17:42
To: Ozge Can Ozcanli
Cc: vxl-users@lists.sourceforge.net
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.

Brandon

On Mon, Oct 29, 2012 at 12:02 PM, Ozge Can Ozcanli <ozgecanozcanli@gmail.com> wrote:

Hi,

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@vnl_math@@YA_NN@Z)

 

recently updated all of vxl and got the vnl_math namespace change.

 

any idea how to resolve this?

 

thanks,

Ozge

 

 


------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Vxl-users mailing list
Vxl-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vxl-users




--
Brandon Mayer
b.mayer1@gmail.com
516.672.0551