VS2010 compiler and cuda error: communication specification is incompatible with the previous “hypothesis”,

When I try to create my project on 64-bit Windows 7 using VS 2010 in the configuration of 64-bit debugging, I get this error along with two other errors.

error: the specification of binding is incompatible with the previous "hypothesis" in the line math.h 161 error: the specification of binding is incompatible with the previous "hypotf" in the line math.h 161 error: the function "abs (long long)" is already defined in the line math_functions.h 534

I do not get these errors in a 32-bit build. In addition, the 64-bit build worked in VS2008. Is there any proper work around this problem or should I just wait while nvcc supports VS 2010 compiler?

+3
source share
1 answer

Yes, this was changed in VS2010:

/* hypot and hypotf are now part of the C99 Standard */
static __inline double __CRTDECL hypot(_In_ double _X, _In_ double _Y)
{
    return _hypot(_X, _Y);
}

Not sure about abs () error, line number looks wrong. The math_functions.h header is no longer compatible with VS2010, something should give. Check out the need to still have #include math.h, it should be functionally replaced by Cuda. Hacking the header will be another way to overcome the problem until they fix it:

#if !defined(_MSC_VER) || _MSC_VER < 0x1400
    // hypotf definition here...
#endif
+1
source

Source: https://habr.com/ru/post/1764167/


All Articles