Discussion:
[Foxgui-users] Visual Studio 2015 error C2589 and C2059
John Selverian
2016-04-14 22:39:59 UTC
Permalink
In Visual Studio 2012 I use "Platform Toolset Visual Studio (V110)"



I just upgraded to Visual Studio 2015 and using the default "Platform
Toolset Visual Studio (v140)" gives these errors below.



switching to "Platform Toolset V110" on VS 2015 fixes the problems but I
wonder if this is a VS bug of Fox bug. I see this with fox 1.6.44 and 1.7.50





compile errors:





1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(32):
error C2589: '(': illegal token on right side of '::'

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(32):
error C2059: syntax error: '::'

.....

.....

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(310):
error C2589: '(': illegal token on right side of '::'

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(310):
error C2059: syntax error: '::'







In cmath.h these errors correspond to lines where the funciton names below





for example, when I hover my mouse over fabsf I see this "#define fabsf(x)
((float)fabs((double(x)))"







_Check_return_ inline float abs(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD fabsf(_Xx));

}



_Check_return_ inline float acos(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD acosf(_Xx));

}



_Check_return_ inline float asin(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD asinf(_Xx));

}



_Check_return_ inline float atan(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD atanf(_Xx));

}



_Check_return_ inline float atan2(_In_ float _Yx, _In_ float _Xx) _NOEXCEPT

{

return (_CSTD atan2f(_Yx, _Xx));

}



_Check_return_ inline float ceil(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD ceilf(_Xx));

}



_Check_return_ inline float cos(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD cosf(_Xx));

}



_Check_return_ inline float exp(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD expf(_Xx));

}



_Check_return_ inline float fabs(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD fabsf(_Xx));

}



_Check_return_ inline float floor(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD floorf(_Xx));

}



_Check_return_ inline float fmod(_In_ float _Xx, _In_ float _Yx) _NOEXCEPT

{

return (_CSTD fmodf(_Xx, _Yx));

}



_Check_return_ inline float log(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD logf(_Xx));

}



_Check_return_ inline float log10(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD log10f(_Xx));

}



_Check_return_ inline float pow(_In_ float _Xx,

_In_ float _Yx) _NOEXCEPT

{

return (_CSTD powf(_Xx, _Yx));

}



_Check_return_ inline float pow(_In_ float _Xx, _In_ int _Yx) _NOEXCEPT

{

if (_Yx == 2)

return (_Xx * _Xx);



return (_CSTD powf(_Xx, static_cast<float>(_Yx)));

}



_Check_return_ inline float sin(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD sinf(_Xx));

}



_Check_return_ inline float sqrt(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD sqrtf(_Xx));

}



_Check_return_ inline float tan(_In_ float _Xx) _NOEXCEPT

{

return (_CSTD tanf(_Xx));

}







Kind regards,



js
Olivier B.
2016-04-15 06:37:45 UTC
Permalink
Doesn't VS2013+ give you the cpp that was being compiled when the hpp error
was encountered a bit further in the output window? The more likely error
is in some of your code that uses those functions. And i don't see in your
mail anything showing FOX could have anything to do with it.
Post by John Selverian
In Visual Studio 2012 I use "Platform Toolset Visual Studio (V110)"
I just upgraded to Visual Studio 2015 and using the default "Platform
Toolset Visual Studio (v140)" gives these errors below.
switching to "Platform Toolset V110" on VS 2015 fixes the problems but I
wonder if this is a VS bug of Fox bug. I see this with fox 1.6.44 and 1.7.50
1>C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\cmath(32): error C2589: '(': illegal token on right side of
'::'
1>C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\cmath(32): error C2059: syntax error: '::'
.....
.....
1>C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\cmath(310): error C2589: '(': illegal token on right side
of '::'
1>C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\cmath(310): error C2059: syntax error: '::'
In cmath.h these errors correspond to lines where the funciton names below
for example, when I hover my mouse over fabsf I see this "#define fabsf(x)
((float)fabs((double(x)))"
_Check_return_ inline float abs(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD fabsf(_Xx));
}
_Check_return_ inline float acos(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD acosf(_Xx));
}
_Check_return_ inline float asin(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD asinf(_Xx));
}
_Check_return_ inline float atan(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD atanf(_Xx));
}
_Check_return_ inline float atan2(_In_ float _Yx, _In_ float _Xx) _NOEXCEPT
{
return (_CSTD atan2f(_Yx, _Xx));
}
_Check_return_ inline float ceil(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD ceilf(_Xx));
}
_Check_return_ inline float cos(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD cosf(_Xx));
}
_Check_return_ inline float exp(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD expf(_Xx));
}
_Check_return_ inline float fabs(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD fabsf(_Xx));
}
_Check_return_ inline float floor(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD floorf(_Xx));
}
_Check_return_ inline float fmod(_In_ float _Xx, _In_ float _Yx) _NOEXCEPT
{
return (_CSTD fmodf(_Xx, _Yx));
}
_Check_return_ inline float log(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD logf(_Xx));
}
_Check_return_ inline float log10(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD log10f(_Xx));
}
_Check_return_ inline float pow(_In_ float _Xx,
_In_ float _Yx) _NOEXCEPT
{
return (_CSTD powf(_Xx, _Yx));
}
_Check_return_ inline float pow(_In_ float _Xx, _In_ int _Yx) _NOEXCEPT
{
if (_Yx == 2)
return (_Xx * _Xx);
return (_CSTD powf(_Xx, static_cast<float>(_Yx)));
}
_Check_return_ inline float sin(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD sinf(_Xx));
}
_Check_return_ inline float sqrt(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD sqrtf(_Xx));
}
_Check_return_ inline float tan(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD tanf(_Xx));
}
Kind regards,
js
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications
Manager
Applications Manager provides deep performance insights into multiple
tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Foxgui-users mailing list
https://lists.sourceforge.net/lists/listinfo/foxgui-users
Selverian, John
2016-04-21 13:36:07 UTC
Permalink
I fixed it.

I added

#include <cmath>


And rebuild the fox library with the “Platform Toolset” set to “Visual Studio 2015 (v140)”


js


From: Olivier B. [mailto:***@gmail.com]
Sent: Friday, April 15, 2016 2:38 AM
To: foxgui-***@lists.sourceforge.net
Subject: Re: [Foxgui-users] Visual Studio 2015 error C2589 and C2059

Doesn't VS2013+ give you the cpp that was being compiled when the hpp error was encountered a bit further in the output window? The more likely error is in some of your code that uses those functions. And i don't see in your mail anything showing FOX could have anything to do with it.

2016-04-15 0:39 GMT+02:00 John Selverian <***@jahm.com<mailto:***@jahm.com>>:
In Visual Studio 2012 I use "Platform Toolset Visual Studio (V110)"

I just upgraded to Visual Studio 2015 and using the default "Platform Toolset Visual Studio (v140)" gives these errors below.

switching to "Platform Toolset V110" on VS 2015 fixes the problems but I wonder if this is a VS bug of Fox bug. I see this with fox 1.6.44 and 1.7.50


compile errors:


1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(32): error C2589: '(': illegal token on right side of '::'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(32): error C2059: syntax error: '::'
.....
.....
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(310): error C2589: '(': illegal token on right side of '::'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(310): error C2059: syntax error: '::'



In cmath.h these errors correspond to lines where the funciton names below


for example, when I hover my mouse over fabsf I see this "#define fabsf(x) ((float)fabs((double(x)))"



_Check_return_ inline float abs(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD fabsf(_Xx));
}

_Check_return_ inline float acos(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD acosf(_Xx));
}

_Check_return_ inline float asin(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD asinf(_Xx));
}

_Check_return_ inline float atan(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD atanf(_Xx));
}

_Check_return_ inline float atan2(_In_ float _Yx, _In_ float _Xx) _NOEXCEPT
{
return (_CSTD atan2f(_Yx, _Xx));
}

_Check_return_ inline float ceil(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD ceilf(_Xx));
}

_Check_return_ inline float cos(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD cosf(_Xx));
}

_Check_return_ inline float exp(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD expf(_Xx));
}

_Check_return_ inline float fabs(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD fabsf(_Xx));
}

_Check_return_ inline float floor(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD floorf(_Xx));
}

_Check_return_ inline float fmod(_In_ float _Xx, _In_ float _Yx) _NOEXCEPT
{
return (_CSTD fmodf(_Xx, _Yx));
}

_Check_return_ inline float log(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD logf(_Xx));
}

_Check_return_ inline float log10(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD log10f(_Xx));
}

_Check_return_ inline float pow(_In_ float _Xx,
_In_ float _Yx) _NOEXCEPT
{
return (_CSTD powf(_Xx, _Yx));
}

_Check_return_ inline float pow(_In_ float _Xx, _In_ int _Yx) _NOEXCEPT
{
if (_Yx == 2)
return (_Xx * _Xx);

return (_CSTD powf(_Xx, static_cast<float>(_Yx)));
}

_Check_return_ inline float sin(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD sinf(_Xx));
}

_Check_return_ inline float sqrt(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD sqrtf(_Xx));
}

_Check_return_ inline float tan(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD tanf(_Xx));
}



Kind regards,

js



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Foxgui-users mailing list
Foxgui-***@lists.sourceforge.net<mailto:Foxgui-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Loading...