lua-users home
lua-l archive

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




On Sun, Sep 9, 2018 at 6:24 PM pslmsngr <pslmsngr4lua@gmail.com> wrote:

Created a GitHub page to show how I built 5.3.5 version of lua source code using Visual Studio Express 2017 for Windows Desktop.

 

Basically, you download the solution, extract lua-5.3.5.tar.gz into the directory, open the lua-5.3.5.sln solution with Visual Studio Express 2017 for Windows Desktop and compile.

 

Hope I did it right; appears to work.

 

I did get several warnings.  Is this normal?

------ Rebuild All started: Project: LibraryC, Configuration: Release Win32 ------

lapi.c

e:\this\code\lua\lua-5.3.5\src\lapi.c(404): warning C4244: 'return': conversion from 'lua_Unsigned' to 'size_t', possible loss of data

lcode.c

lctype.c

ldebug.c

ldo.c

ldump.c

lfunc.c

lgc.c

llex.c

lmem.c

lobject.c

lopcodes.c

lparser.c

lstate.c

lstring.c

ltable.c

ltm.c

lvm.c

lzio.c

lundump.c

Compiling...

lauxlib.c

lbaselib.c

lcorolib.c

ldblib.c

linit.c

liolib.c

lmathlib.c

loadlib.c

loslib.c

lstrlib.c

ltablib.c

lutf8lib.c

   Creating library E:\this\Code\lua\lua-5.3.5\Output\C\Release\lua53.lib and object E:\this\Code\lua\lua-5.3.5\Output\C\Release\lua53.exp

Generating code

All 875 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.

Finished generating code

LibraryC.vcxproj -> E:\this\Code\lua\lua-5.3.5\Output\C\Release\lua53.dll

Done building project "LibraryC.vcxproj".

------ Rebuild All started: Project: InterpreterC, Configuration: Release Win32 ------

lapi.c

e:\this\code\lua\lua-5.3.5\src\lapi.c(404): warning C4244: 'return': conversion from 'lua_Unsigned' to 'size_t', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lapi.c(898): warning C4244: '=': conversion from 'const int' to 'lu_byte', possible loss of data

lcode.c

e:\this\code\lua\lua-5.3.5\src\lcode.c(383): warning C4244: '+=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(954): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(955): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(1207): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

lctype.c

ldebug.c

e:\this\code\lua\lua-5.3.5\src\ldebug.c(674): warning C4244: 'initializing': conversion from 'sig_atomic_t' to 'lu_byte', possible loss of data

ldo.c

e:\this\code\lua\lua-5.3.5\src\ldo.c(432): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

e:\this\code\lua\lua-5.3.5\src\ldo.c(460): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

ldump.c

lfunc.c

lgc.c

e:\this\code\lua\lua-5.3.5\src\lgc.c(217): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lgc.c(831): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lgc.c(1044): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

llex.c

e:\this\code\lua\lua-5.3.5\src\llex.c(67): warning C4310: cast truncates constant value

lmem.c

lobject.c

lopcodes.c

lparser.c

e:\this\code\lua\lua-5.3.5\src\lparser.c(333): warning C4244: '-=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(669): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(863): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(1135): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(1140): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

lstate.c

lstring.c

e:\this\code\lua\lua-5.3.5\src\lstring.c(209): warning C4310: cast truncates constant value

e:\this\code\lua\lua-5.3.5\src\lstring.c(244): warning C4310: cast truncates constant value

e:\this\code\lua\lua-5.3.5\src\lstring.c(250): warning C4244: '=': conversion from 'const int' to 'lu_byte', possible loss of data

ltable.c

ltm.c

lvm.c

e:\this\code\lua\lua-5.3.5\src\lvm.c(499): warning C4310: cast truncates constant value

lzio.c

lua.c

Compiling...

lundump.c

Generating code

All 464 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.

Finished generating code

InterpreterC.vcxproj -> E:\this\Code\lua\lua-5.3.5\Output\C\Release\lua.exe

Done building project "InterpreterC.vcxproj".

------ Rebuild All started: Project: CompilerC, Configuration: Release Win32 ------

lapi.c

e:\this\code\lua\lua-5.3.5\src\lapi.c(404): warning C4244: 'return': conversion from 'lua_Unsigned' to 'size_t', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lapi.c(898): warning C4244: '=': conversion from 'const int' to 'lu_byte', possible loss of data

lcode.c

e:\this\code\lua\lua-5.3.5\src\lcode.c(383): warning C4244: '+=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(954): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(955): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lcode.c(1207): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

lctype.c

ldebug.c

e:\this\code\lua\lua-5.3.5\src\ldebug.c(674): warning C4244: 'initializing': conversion from 'sig_atomic_t' to 'lu_byte', possible loss of data

ldo.c

e:\this\code\lua\lua-5.3.5\src\ldo.c(432): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

e:\this\code\lua\lua-5.3.5\src\ldo.c(460): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

ldump.c

lfunc.c

lgc.c

e:\this\code\lua\lua-5.3.5\src\lgc.c(217): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lgc.c(831): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lgc.c(1044): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

llex.c

e:\this\code\lua\lua-5.3.5\src\llex.c(67): warning C4310: cast truncates constant value

lmem.c

lobject.c

lopcodes.c

lparser.c

e:\this\code\lua\lua-5.3.5\src\lparser.c(333): warning C4244: '-=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(669): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(863): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(1135): warning C4244: '=': conversion from 'int' to 'lu_byte', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lparser.c(1140): warning C4244: '=': conversion from 'int' to 'short', possible loss of data

lstate.c

lstring.c

e:\this\code\lua\lua-5.3.5\src\lstring.c(209): warning C4310: cast truncates constant value

e:\this\code\lua\lua-5.3.5\src\lstring.c(244): warning C4310: cast truncates constant value

e:\this\code\lua\lua-5.3.5\src\lstring.c(250): warning C4244: '=': conversion from 'const int' to 'lu_byte', possible loss of data

ltable.c

ltm.c

lvm.c

e:\this\code\lua\lua-5.3.5\src\lvm.c(499): warning C4310: cast truncates constant value

lzio.c

lundump.c

Compiling...

lauxlib.c

e:\this\code\lua\lua-5.3.5\src\lauxlib.c(680): warning C4244: '=': conversion from 'int' to 'char', possible loss of data

e:\this\code\lua\lua-5.3.5\src\lauxlib.c(730): warning C4244: '=': conversion from 'int' to 'char', possible loss of data

luac.c

Generating code

e:\this\code\lua\lua-5.3.5\src\lapi.c(1125): warning C4702: unreachable code

All 481 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.

Finished generating code

CompilerC.vcxproj -> E:\this\Code\lua\lua-5.3.5\Output\C\Release\luac.exe

Done building project "CompilerC.vcxproj".

========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========

 

Thanks,

Richard Green

 

 

 

Sent from Mail for Windows 10

 


Hi Richard, 

I have not had a chance to get back to WinLua for a couple of days, but I have a VS solution at https://github.com/WinLua/WinLua-VisualStudio. I have an uncommitted change that builds 5.3.5 but I didn't look at the output. I'll try have a look tonight and push the changes. The solution you would want to compare with is under .../Visual Studio/5.3/

 
Thijs' LuaWinMake is awesome and I highly recommend it . While getting Lua building under VS was a "fun" exercise, my opinion is the workflow enforced by the IDE does not have any benefits unless you want to use the debugger. Aligning configurations with various VC++ settings can be a veritable nightmare. I've spent dozens of hours tracing down bugs because I missed a single setting between x86 and x64 builds and you can't find the error until you go through *every single stupid dialog box* in every single configuration. I usually resorted to reading the project file, and cutting and pasting settings which is in itself a nightmare.


Good Luck!

Russ