Hi John,

thanks for your support!

On 10.08.2013 at 18:14 John Labenski wrote:

> 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. 

This unfortunately doesn't work here for me. I don't have Visual Studio but 
just its compiler
collection that is freely available with the Windows SDK. That's why I use the 
generator named
"NMake Makefiles" in the CMake GUI. Here is my CMake configuration:

http://www.falkenhahn.com/tmp/cmake.png

When I try to build wxLua then by typing nmake, it first builds some parts of 
lua 5.1 but
then it fails completely saying:

NMAKE : fatal error U1073: don't know how to make 
'modules\lua-5.1\LuaLib.dir\.\lapi.obj'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.

Here is a screenshot of nmake's output:

http://www.falkenhahn.com/tmp/nmake.png

You can see that some parts of wxLua are actually built just fine but then it 
just exits
because of a problem in the makefile. It seems like a wrong build rule but I 
don't know
anything about CMake and this whole build system looks really complicated with 
lots of
references and temporary files being created while building so that I'm hardly 
able to
fix this.

That's why I just went and setup my own makefile to build it. 

> 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. 

See above. If you can help me to get this to build, I can check if the error 
only
happens with my custom makefile.

> 
> 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? 

Yes, I did. By default, wxWidgets wants to build using /MD but I changed
this because I prefer /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.

Yes, with your prebuilt wx.dll from the official distribution there are
no problems. It's only my builds that fail.

> 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

Yes, luamodule.cpp is actually exactly the code I used in my example. The app is
instantiated in luaopen_wx(). Is there anything else that needs to be done?

-- 
Best regards,
 Andreas Falkenhahn                            mailto:andr...@falkenhahn.com


------------------------------------------------------------------------------
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

Reply via email to