BCB6 Compiled LUA5.15 success!

Source: Internet
Author: User

Because you want to provide scripting functionality in a native app, Python's release is a hassle. Because the scripting features are simple, we decided to try the legendary Lua.

The first step, download the source code. Although Lua has a binary version to download, but because I am using the turbo C + + Explorer (that is, the free version of C++builder), I decided to compile the source code myself. The download location is of course Lua's official website: http://www.lua.org.

The second step is to compile the installation. The source only provides GCC with the make file and VC with a bat file, BCB need to do their own hands. At first I didn't know what was wrong, always compiling wrong--although the compilation was successful, the execution error occurred. It took a while to finally get it done, the corresponding compilation parameters are as follows:

bcc32-dndebug-dno_strict;_no_vcl-hc-twd-w-par-o2-b--k--vi-twm-tw--c-dlua_build_as_dll-p-L*.cdel Lua.objdel Luac.objilink32-tpd-gn-j-x-gi c0d32.obj lapi.obj lauxlib.obj lbaselib.obj lcode.obj ldblib.obj ldebug.obj ldo.obj LDU Mp.obj lfunc.obj lgc.obj linit.obj liolib.obj llex.obj lmathlib.obj lmem.obj loadlib.obj lobject.obj lopcodes.obj loslib. obj lparser.obj lstate.obj lstring.obj lstrlib.obj ltable.obj ltablib.obj ltm.obj lundump.obj lvm.obj lzio.obj, Lua51.dll  ,, Import32.lib Cw32mt.lib,, del *.tdsdel *.objbcc32-d_isatty=isatty-dndebug-dno_strict;_no_vcl-hc-w-par-o2-b--k- -vi-twc-twm-tw--c-dlua_build_as_dll-p-lua.cilink32-tpe-gn-j-x c0x32.obj lua.obj, Lua51.exe,, Import32.lib Lua 51.lib Cw32mt.lib,, del *.tdsdel *.obj

Step three, Hello world. To run a successful compilation Lua51.exe try:

Print "Hello world!"

Get.

The rest of the job is to read Yunfeng's LUA document study--alas, it's much more difficult to learn new things after age. -_-|||

Cha ka: http://blog.csdn.net/raptor/article/details/1572207

BCB6 Compiled LUA5.15 success!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.