2014年2月22日土曜日

LuaBinariesのマニュアルの一部翻訳

lua5.1.dll と lua51.dll の違いが分からないので調べていたら LuaBinariesの公式マニュアル に行き着いた。

どうやら、実行自体には lua5.1.dll と lua51.dll の両方が必要で、プロジェクトに追加する依存ファイルは lua5.1.lib で問題ないっぽい。

WindowsのCランタイムライブラリとその制限事項、及びLuaBinariesのビルド環境等の根深い要因が関わってくるらしく、よく理解できませんでした。

きちんと訳せている自信が全くない、誤訳だらけな気がするので、ちゃんとした情報を知りたい方は翻訳元を自分で読んで下さい。もし間違ってたらご指摘お願いします。

[ 2014.02.23 追記 ]
スタブライブラリは .lib ファイルらしいです。
What's the purpose of the lua "stub" dll for windows - Stack Overflow
プロジェクトとスタブライブラリを関連付けて初めてdllの中身を呼べるようになる訳ですな。必要なdllはlua5.1.dllのみっぽいです。後日検証します。

イマイチよく分かりませんが、lua5.1.dllがluaのコアdll、lua51.dllはLua Binariesのdllで、それぞれを使うにはそれぞれ、libファイルと実行ファイルをプロジェクトの設定でリンクする必要がある、基本的にはlua5.1.dllとlua5.1.libがあればいい、ということでしょうか。lua51.dllとlua51.libの使い方がまるで分からんぞ!
[ 追記ここまで ]


以下引用と翻訳。

LuaBinaries for Windows Compatibility

LuaBinaries for Windowsの互換性

In Windows your library or application must be linked with a stub library. A stub library is a library with only the function declarations that will bind your DLL with the Lua DLL. The LuaBinaries DLL is called "lua52.dll".

Windowsにおいて、あなたのライブラリまたはアプリケーションはスタブライブラリとリンクされなければならない。スタブラリブラリはあなたのDLLをLua DLLと結びつける関数定義のみのライブラリである。そのLuaBinariesのDLLは「lua52.dll」と呼ばれる。

For Lua 5.1

Lua 5.1について

We choose the Visual C++ 8 compiler to build the LuaBinaries executables.

我々はLuaBinariesのプログラムをビルドするのに Visual C++ 8 コンパイラを選択した。

Up to Visual C++ version 6, the C run time library was called "msvcrt.dll" and this DLL is today included in all modern Windows systems (W2K, WinXP, Vista and 7). But for Visual C++ 8, Microsoft released a free version of the compiler called "Express". We consider that an important step for developers using LuaBinaries DLLs. Also It is know that "msvcrt.dll" has some problems and limitations, particularly with multi-threading. So we decided to move to Visual C++ 8 version for which the C run time library is called "msvcr80.dll".

Visual C++ version 6で、Cのランタイムライブラリは「msvcrt.dll」と呼ばれた。そして、このDLLは今日全てのモダンなWindowsシステム ( W2k、WinXP、Vista、そして7 ) に含まれています。しかし、Visual C++ 8においては、マイクロソフトは「Express」と呼ばれるフリーバージョンのコンパイラをリリースした。我々はLuaBinariesのDLLを使う開発者にとって重要なステップを熟考した。また、それは「msvcrt.dll」はいくつかの問題と制限、特にマルチスレッドにおける―を抱えていることが知られている。そのため、我々は「msvcr80.dll」と呼ばれるCランタイムライブラリのためにVisual C++ 8バージョンへの移行を決定した。

The LuaBinaries DLL packages have a dll proxy called "lua51.dll". It can be used to replace other "lua51.dll" released by other distributions. It will simply forward calls to the "lua5.1.dll". There is no compiled source code involved in the forwarding.

LuaBinariesのDLLパッケージには「lua51.dll」と呼ばれるdll proxyが含まれます。それは、他のディストリビューションによってリリースされた、他の「lua51.dll」を置き換えることが出来ます。それは単純に「lua5.1.dll」に関数コールを転送します。forwardingに含まれるコンパイルされたソースコードはありません。

0 件のコメント: