On Sat, Aug 10, 2013 at 7:18 AM, Andreas Falkenhahn
<andr...@falkenhahn.com>wrote:
>
> I've included the source code and makefile in the archive but it's really
> nothing more than an unmodified version of Lua 5.1 and of wxLua taken
> from the SVN. I also tried it with an older wxLua (version 2.8.10.0) but
>
...
> The only modification I made is in the main() function of lua.c. I
> inserted the call to luaopen_wx() directly after creating the lua_State
> using lua_open() because I wanted to have everything in a single program,
> i.e. wxLua isn't loaded as a DLL but is statically linked to the lua
> interpreter. But this really shouldn't do any harm.
>
>
Hi Andreas,
You have two things that could be the problem here; your custom build and
your modified code.
Build wxLua using the provided CMakeFiles as described in the install.html
in the docs dir. Run some of the samples and verify that they work. Do they?
1) About your custom build, I would really just use wxLua's build files,
please let me know why they aren't suitable for you. Also, make sure that
wxLua is compiled with the same Lua source files as the lib you are linking
to, you may be using mismatched Lua libs. I noticed that you use /MT for
linking, wxWidgets and wxLua use /MD by default, did you build wxWidgets as
/MT too? I obviously recommend using /MD since I think it's better to use
the system default.
http://stackoverflow.com/questions/3469841/mixing-code-compiled-with-mt-and-md
http://stackoverflow.com/questions/757418/should-i-compile-with-md-or-mt
2) Rem out your "luaopen_wx()" call and run one of the samples that use '
require("wx") ' call to use the built wx.dll and see if you can do that. I
believe that instead of adding luaopen_wx() you should simply just run
wxluafreeze.exe since its code does what wxLua needs to install itself into
Lua properly.
This code shows how to properly instantiate wxLua using a wxApp as main().
http://sourceforge.net/p/wxlua/svn/184/tree/trunk/wxLua/apps/wxluafreeze/wxluafreeze.cpp
or this which is for loading from a DLL, note the wxApp too.
http://sourceforge.net/p/wxlua/svn/184/tree/trunk/wxLua/modules/luamodule/luamodule.cpp
Your crash in
void wxLua_wxGridCellCoords_delete_function(void** p)
makes no sense if you never created a wxGridCellCoords. You must be
overwriting some variable and mangling the code. You can use the program
"ApplicationVerifier" to find memory overflows, it works great. But, I
would definitely fix the above problems first.
Regards,
John
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users