Ethereal-dev: Re: [Ethereal-dev] Lua for windows, need help

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Wed, 8 Feb 2006 13:56:58 +0100
On 2/8/06, Lars Roland <Lars.Roland@xxxxxxx> wrote:
> Hello all,
>
> here are the nmake makefiles for building the lua libs with MSVC6.
> To build lua, do the following steps:
> - Download lua sources from http://www.lua.org/ftp/lua-5.0.2.tar.gz and extract it
> - copy LibLua.nmake to lua-5.0.2/src and LibLuaLib.nmake to lua-5.0.2/src/lib
> - build libraries by calling "nmake -f LibLua.nmake" and "nmake -f LibLuaLib.nmake"
>
> You will find the built libraries in Lua-5.0.2/bin

Good!

> I had a strange problem with an error when linking the libs with the lua plugin, but the error vanished somehow. I hope the makefiles work for others, too.
>
> BTW, Luis I noticed that your "Hello World" demo doesn't print anything anywhere, even not into the debug window, when using it with ethereal. tethereal works fine with lua. Is this windows specific or is the print function not supported in ethereal?

I think writing to stdout does not work with eteheral on windows, the
more, just yesterday while working on main.c I've skim-read some
comment that hinted me that writing to stdout might cause problems to
the capture child on windows.

Ulf, can you confirm that?

In that case I I'll have override lua's "print" and write our own that
uses g_log instead of printf and make sure that stdout is not directly
accessible from Lua when running ethereal (at least on Windows).


-- BTW you can try this instead
if gui_enabled() then
   win = TextWindow.new("Hello")
   win:set("Hello World!")
  -- This window will be behind ethereal's main window as soon as that
one draws.
else
  print("Hello World!")
end

> Gerald, perhaps you can create a package including the sources, the nmake makefiles
> and the built libs and put it on http://anonsvn.ethereal.com/ethereal-win32-libs/trunk/packages/

Yeah, that would help!

--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan