Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のスクリプトは、アプリケーション (ターミナル) の外部から実行すると正常に動作しますが、C++ アプリケーションの内部から呼び出されると、require("luasql.mysql") 呼び出しでシャットダウンします。
誰でも助けることができますか?
インストールされているモジュールをロードするには、スクリプト内で package.cpath と package.path を設定する必要があります。そのため、package.cpath には、lua が clib をロードするためにチェックできるフォルダーが必要です。package.path も同じですが、今回は lua モジュールまたはファイルをロードします。