gc * 4 ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gc * 4 ?

kaishaku13
My "gc" tag method is being called 4 times instead of 1.
Four time for ever "new" object created, using the methods
described in a previous mail on minimal 4.1w4 OO.

Is this normal? Common mistake in my programming?


Reply | Threaded
Open this post in threaded view
|

Re: gc * 4 ?

kaishaku13
Found the problem... changes in 4.1w4.

--- In lua-l@y..., "kaishaku13" <kaishaku13@h...> wrote:
> My "gc" tag method is being called 4 times instead of 1.
> Four time for ever "new" object created, using the methods
> described in a previous mail on minimal 4.1w4 OO.
> 
> Is this normal? Common mistake in my programming?


Reply | Threaded
Open this post in threaded view
|

Installing Lua on MSVC++6

Joms Araneta
Hi everyone!

    I'm really confused, how do you install Lua and toLua on a Win32 system?
The lua downloads site only says to copy all *.h *.c and create a project
file and compile them. But can anyone give me a step-by-step description of
how to do it? And how would you bind lua to a game engine?

Thanks,
        Joms

Reply | Threaded
Open this post in threaded view
|

Re: Installing Lua on MSVC++6

jame
If your using the latest stable release you should be able to create
a new dynamic or static lib project and simply drag all the Lua .h
and .c files into it. I've done this numerous times - it should
compile cleanly.

Download the lib here:

http://www.lua.org/download.html

Gunzip, then untar it. Then in MSVC create a new project, either
a dll or a static lib. When you create it specify the lua dir as the
base for the project.  I usually name the project 'lualib' or similar,
so I end up with the following:

lua/lualib/msvc project files

(If you create a DLL, you'll have to change the LUA_API define in lua.h
from 'extern' to '__declspec(dllexport)' )

Then right click the project in MSVC after it's created and select
"add files to project". Go into the lua/src dir and add all the .c's and
.h's. Also add the aux lib src files in lua/src/lib. These give you
additional functionality like debugging support, basic fileio, math
functions, strings and few other odds and ends.

Next create an include path to the project so MSVC knows where
lua.h is. (Project->Settings->C/C++ Tab->Category:Preprocessor,
in the the "Additional Include Directories" text entry put: "../include"

Then compile it. Like I said, it should compile clean... I just tested this
with the latest and here's the compile:

--------------------Configuration: lualib - Win32 Debug--------------------
Compiling...
lapi.c
lcode.c
ldebug.c
ldo.c
lfunc.c
lgc.c
llex.c
lmem.c
lobject.c
lparser.c
lstate.c
lstring.c
ltable.c
ltests.c
ltm.c
lundump.c
lvm.c
lzio.c
lstrlib.c
lauxlib.c
lbaselib.c
ldblib.c
liolib.c
lmathlib.c
Creating library...

lualib.lib - 0 error(s), 0 warning(s)
----------------------------------------------------------------------------
------

Now you either have a DLL or a static lib you can link to.
All you have to do is link this into your game, initialize
the lua vm and it's libs and you can start using Lua.

Since I just did all this to make sure it would work.. I zipped
up the result (including an example console app) and put it
here.

http://www.mathies.com/temp/

If it doesn't already exist, maybe somebody should put this
project up on the Wiki?

Hope this helps...

Regards,
Jim









--
Your born, you die. What happens in between is up to you.
----- Original Message -----
From: "Joms Araneta" <[hidden email]>
To: "Multiple recipients of list" <[hidden email]>
Sent: Sunday, April 14, 2002 5:27 AM
Subject: Installing Lua on MSVC++6


> Hi everyone!
>
>     I'm really confused, how do you install Lua and toLua on a Win32
system?
> The lua downloads site only says to copy all *.h *.c and create a project
> file and compile them. But can anyone give me a step-by-step description
of
> how to do it? And how would you bind lua to a game engine?
>
> Thanks,
>         Joms
>
>
>