如何在 C++ 中链接 LuaSQL应用?

发布于 2024-09-04 09:59:55 字数 105 浏览 2 评论 0原文

当我从应用程序外部(终端)执行我的脚本时,它运行良好,但是当从 C++ 应用程序内部调用它时,它会在 require("luasql.mysql") 调用中关闭。

有人可以帮忙吗?

My script runs fine when I execute it from outside the application (terminal), but when its called from inside the C++ application it shuts down in the require("luasql.mysql") call.

Can anyone help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梅窗月明清似水 2024-09-11 09:59:55

必须在脚本内设置 package.cpath 和 package.path 才能加载已安装的模块。所以 package.cpath 必须有 lua 可以检查 clib 来加载它们的文件夹,package.path 也是如此,但这次是加载 lua 模块或文件。

The package.cpath and package.path must be set inside the script to load the modules that are installed. So package.cpath must have the folders that lua can check for the clibs to load them, and the same for package.path, but this time to load lua modules or files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文