gpt4 book ai didi

c++ - 将 C++ 库打包到 Rails 应用程序中供 Heroku 使用

转载 作者:IT老高 更新时间:2023-10-28 22:14:46 26 4
gpt4 key购买 nike

前几天问 Heroku 支持的下一件事:

I have an app that will require a client library written in C++. I have doubts can that be done with Heroku. Is it possible at all, any alternatives how can a C++ library be installed and used by an app with Heroku?

我得到了下一个答案:

We currently don't have a good way to do this. You'll need to figure out how to package into your app and compile static x64 binaries into the repo.

我以前没有这样做过。有没有人知道如何将 C++ 库打包到 Rails 应用程序中以便与 Heroku 一起使用?

谢谢。

最佳答案

要在 Ruby 中封装 C++ 库,您需要 Rb++ .

或者,您可以将 C++ 库封装在 C 中,然后使用 Ruby-FFI 封装它。 .

我不确定如何才能在 Heroku 上编译 native 扩展。我会联系他们的支持并询问。

关于c++ - 将 C++ 库打包到 Rails 应用程序中供 Heroku 使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5563987/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com