[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mathlib
- From: Coroutines <coroutines@...>
- Date: Tue, 8 Apr 2014 09:42:24 -0700
On Tue, Apr 8, 2014 at 9:33 AM, Joshua Jensen <josh.jjensen@gmail.com> wrote:
>
> ----- Original Message -----
> From: Luiz Henrique de Figueiredo
> Date: 4/8/2014 10:07 AM
>>>
>>> [mathx] can be quite painful to build it, particularly
>>> if your C compiler happens not to be gcc. In fact, I have not heard
>>> of anyone getting it to work on (surprise, surprise) Visual C++.
>>
>> I'd be very interested in what needs to be done to make mathx more portable.
>>
> <sigh> I get tired of the non-stop Visual C++ bashing. Can we please stop it? Visual C++ isn't going away.
>
> Anyway, the first portability fix would be to make the same code compile against Lua 5.1 and 5.2 like a lot of other modules:
>
> LUALIB_API int luaopen_mathx(lua_State *L)
> {
> #if LUA_VERSION_NUM <= 501
> luaL_register(L,LUA_MATHLIBNAME,R);
> #else
> lua_getglobal(L,LUA_MATHLIBNAME);
> luaL_setfuncs(L,R,0);
> #endif
>
> Outside of that, it compiles without issue on Visual Studio 2013.
>
> For Visual Studio 2010 and 2012, the following warnings and errors are generated. I don't know what you would do to fix them.
>
> lmathx.c(21) : warning C4013: 'acosh' undefined; assuming extern returning int
> ....
Looks like most of these functions are list here:
http://msdn.microsoft.com/en-us/library/hh553049.aspx
Seems you need:
#ifdef __WIN32
# include <amp_math.h>
#endif
- References:
- Re: mathlib, Ousmane Roland Yonaba
- Re: mathlib, Roberto Ierusalimschy
- Re: mathlib, Ralph Hempel
- Re: mathlib, Roberto Ierusalimschy
- Re: mathlib, Enrico Colombini
- Re: mathlib, Rena
- Re: mathlib, Michel Martens
- Re: mathlib, Dirk Laurie
- Re: mathlib, Luiz Henrique de Figueiredo
- Re: mathlib, Joshua Jensen