[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re-initializing IUP v2.3?
- From: "R. Frazier" <rtdoger@...>
- Date: Wed, 30 Mar 2005 23:00:12 -0500
I need to re-initialize IUP v2.3 and Lua 5.0.2 several times over, (below is
just a test setup
to see if it works or not), however my program crashes the second time
IupClose() is called.
Why is it crashing on IupClose() and what can I do to fix it?
There's two functions that don't have a matching close, iuplua_open(L) and
controlslua_open(L),
everything else does.
If I completely remove IUP, re-initialization works. However, it crashes
when I put IUP back in.
I've already tried to move the order of lines around, but nothing is
working.
/////////////////////////////////////////////
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#include "iup.h"
#include "iuplua.h"
#include "iupcontrols.h"
#include "luacontrols.h"
int TryIt();
void
main() {
TryIt();
TryIt();
TryIt();
}
int
TryIt() {
IupOpen();
IupControlsOpen();
lua_State *L = lua_open();
luaopen_base(L);
luaopen_string(L);
luaopen_table(L);
luaopen_io(L);
luaopen_math(L);
luaopen_debug(L);
iuplua_open(L);
controlslua_open(L);
lua_dofile( L, "test.lua" );
IupMainLoop();
lua_close(L);
L = NULL;
IupControlsClose();
IupClose();
return 1;
}
_________________________________________________________________
Designer Mail isn't just fun to send, it's fun to receive. Use special
stationery, fonts and colors.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.