5

Lua と https について質問があります。Lua をサポートするルーター用のソフトウェアを開発しています。悪いことに、このルーターはデバッグをサポートしていません。そこで、Lua 用の IDE を探していました。

Win 7 64 ビット OS で Lua 開発ツールと LuaForWindows を使用しています。これまでのところ、すべてが正常に機能しています。しかし、今はいくつかの URL を https で呼び出さなければなりません。require ("ssl.https")ルーター自体にはパッケージ ssl.lua があり、ステートメントでこのパッケージを使用できます。しかし、Lua 開発ツールでデバッグしたいのです。Windows と互換性のあるパッケージを探していて、「Luasec」プロジェクトを見つけました。

このスレッド「Lua with Freebase API」で言及されているように。Luasecをダウンロードしました。

ssl.luaおよび ssl フォルダーを lua インストール内に配置しssl.dll、lua インストール内の clibs フォルダーに配置しました。

テストのために、Lua ファイルで require ("ssl.https") のみを行いますが、クラッシュします。それは言います:

C:\Program Files (x86)\Lua\5.1\lua.exe: error loading module 'ssl.core' from file 'C:\Program Files (x86)\Lua\5.1\clibs\ssl.dll':
    %1 ist keine zulässige Win32-Anwendung. (%1 is no a valid Win32 application)

Win 7 32ビットPCでもテストしましたが、次のようにクラッシュします:

C:\Program Files\Lua\5.1\lua.exe: error loading module 'ssl.core' from file 'C:\Program Files\Lua\5.1\clibs\ssl.dll':
    Das angegebene Modul wurde nicht gefunden. (The module cant be found)

この仕事を手伝ってくれる人はいますか?

4

2 に答える 2

3

Alienを使用してWindows DLLをロードすると、Windows 7 64ビットでも同じ問題が発生しました。

読み込んでいたライブラリ (つまり DLL) は 64 ビット DLL ですが、Lua for Windows は 32 ビット アプリケーションです。

代わりにロードした 32 ビット バージョンの DLL があり、それは動作します。ライブラリの 32 ビット バージョンを見つけることができるかどうかも確認してください。

32 ビット Windows での問題については、もちろん他の要因が原因である可能性がありますが、同じ 64 ビット DLL を使用している場合、それも機能しないと思います。

于 2013-07-26T05:48:59.173 に答える
2

I got this problem yesterday and solved it by downloading the source code of Luasec and built it with static library on a 32-bit windows 7 pc. You may try to build your own.

I changed some configurations in my C/C++ and Linker properties of project. Below are what I changed:

  • C/C++ -> Code Generation -> Runtime Library: Multi-threaded (/MT)
  • Linker -> General -> Additional Library Directories: C:\OpenSSL-Win32\lib\VC\static
  • Linker -> Input -> Additional Dependencies: add libeay32MT.lib and ssleay32MT.lib

Or, you could download my version here if you need.

于 2013-08-09T03:33:55.260 に答える