lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have no idea why the compiler is complaining about these casts, but
I commited a patch that removes them in favor of casts in the opposite
direction. Please tell me if it works, as I only have access to the
VS2005 x86 compiler and it was not complaining in the first place. :-)

--
Fabio Mascarenhas


On Tue, Mar 1, 2011 at 3:44 PM, Attila <ejjeliorjarat@gmail.com> wrote:
> I don't know what is that error, but I am unable to compile. Other errors
> disappeared, but those two still exist:
> E:\Lua\alien>nmake /f makefile.win64
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
>         cl /c /MD /Fosrc\alien\core.obj /O2 /DWINDOWS /D_WIN64
> /Ic:\usr\local\in
> clude /Ilibffi\win32 src\alien\core.c
> Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
> core.c
> src\alien\core.c(840) : error C2440: ':' : cannot convert from 'void' to
> 'const
> char *'
> src\alien\core.c(1064) : error C2440: ':' : cannot convert from 'void' to
> 'const
>  char *'
> NMAKE : fatal error U1077: '"E:\Munka\Programok\Microsoft Visual Studio
> 10.0\VC\
> BIN\amd64\cl.EXE"' : return code '0x2'
> Stop.
> E:\Lua\alien>
> I hope you can help me to make it working :)
> Thanks in advance,
> Attila
> 2011/3/1 Fabio Mascarenhas <mascarenhas@acm.org>
>>
>> Commited a patch to github to fix some of the problems below. I
>> remembered that Windows x64 was officialy unsupported; the latest
>> version of libffi has support for Windows x64, but I did not have a
>> machine to test this, so I just made Makefile.win64 so someone with a
>> Win64 machine could help me track down the bugs.
>>
>> On Tue, Mar 1, 2011 at 10:55 AM, Attila <ejjeliorjarat@gmail.com> wrote:
>> > Here is the output:
>> >
>> > E:\Lua\alien>nmake /f makefile.win64
>> >
>> > Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
>> > Copyright (C) Microsoft Corporation.  All rights reserved.
>> >
>> >        cl /c /MD /Fosrc\alien\core.obj /O2 /DWINDOWS
>> > /Ic:\usr\local\include
>> > /Il
>> > ibffi\win32 src\alien\core.c
>> > Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
>> > Copyright (C) Microsoft Corporation.  All rights reserved.
>> >
>> > core.c
>> > src\alien\core.c(308) : error C2065: 'FFI_STDCALL' : undeclared
>> > identifier
>>
>> Fixed, libffi for Windows x64 does not define FFI_STDCALL.
>>
>> > src\alien\core.c(308) : error C2099: initializer is not a constant
>> > src\alien\core.c(836) : error C2440: ':' : cannot convert from 'void' to
>> > 'const
>> > char *'
>> > src\alien\core.c(1060) : error C2440: ':' : cannot convert from 'void'
>> > to
>> > 'const
>> > char *'
>>
>> These are very odd, because both lines have explicit casts. Could not
>> find anything on Google about this being specific behavior of the
>> cl.exe for Windows x64.
>>
>> > src\alien\core.c(1422) : error C2079: 'alienlib' uses undefined struct
>> > 'alienlib
>> > '
>> > src\alien\core.c(1422) : error C2078: too many initializers
>> > src\alien\core.c(1452) : warning C4133: 'function' : incompatible types
>> > -
>> > from '
>> > const luaL_reg []' to 'const luaL_Reg *'
>>
>> Seems like Lua 5.2 cut support for luaL_reg as an alias for luaL_Reg,
>> just changed it to use luaL_Reg.
>>
>> --
>> Fabio Mascarenhas
>
>