哪个 C++ CGI 编程库?

发布于 2024-07-09 12:47:14 字数 118 浏览 7 评论 0原文

我正在考虑用编译语言做一些工作(为了好玩)来运行一些简单的测试和针对 php 的基准测试。

基本上我想看看其他人使用什么来进行 C++ CGI 编程。 (包括后端数据库,比如mysql++或者其他)

I'm looking at doing some work (for fun) in a compiled language to run some simple tests and benchmarks against php.

Basically I'd like to see what other people use for C++ CGI programming. (Including backend database, like mysql++ or something else)

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

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

发布评论

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

评论(6

゛时过境迁 2024-07-16 12:47:14

我不确定你到底在寻找什么,但有一个名为 wt(发音为“witty”)的 C++ Web 框架。 它几乎一直保持最新状态,如果您想要强大的 C++ 服务器端代码,这可能就是您正在寻找的。

您可以在 wt 主页 上查看并了解更多信息。

PS 如果您没有使用 *nix 或 C++ 库的经验,那么安装 wt 时可能会遇到一些问题。 虽然有一些演练,但由于像这样的框架是少有人走的路,所以预计会遇到一些障碍。

I'm not sure exactly what you're looking for, but there is a C++ web framework called wt (pronounced "witty"). It's been kept pretty much up to date and if you want robust C++ server-side code, this is probably what you're looking for.

You can check it out and read more at the wt homepage.

P.S. You may have some trouble installing wt if you don't have experience with *nix or C++ libraries. There are walkthroughs but since frameworks like these are the road less traveled, expect to hit a few bumps.

苏佲洛 2024-07-16 12:47:14

另一个选择是 Cgicc 库,它似乎已经成熟(当前版本为 3.x):

http:// www.gnu.org/software/cgicc/

Another option is the Cgicc library which appears to be mature (currently at version 3.x):

http://www.gnu.org/software/cgicc/

南汐寒笙箫 2024-07-16 12:47:14

如果我考虑在那个级别工作,我可能会直接编写 Apache 或 IIS 模块,而不是 CGI。

也就是说,如果您确实想要使用 CGI,我建议使用古老的 cgic 来自 Thomas Boutell。 它是一个“普通”C 库,但自 90 年代中期以来一直在不断使用,因此它经过了彻底的测试并且坚如磐石。

If I were thinking of working at that level, I'd probably just write a straight-up Apache or IIS module instead of a CGI.

That said, if you do want to go with CGI, I'd suggest using the venerable cgic from Thomas Boutell. It's a "plain" C library, but it's been in constant use since the mid '90s so it's thoroughly tested and solid as a rock.

浅忆流年 2024-07-16 12:47:14

查看 Boost 的 C++ CGI 类,它还不是 boost 的一部分

Check out Boost's C++ CGI class, which is not a part of boost yet.

醉酒的小男人 2024-07-16 12:47:14

简而言之,我认为通用服务器 CGI 编程不存在这样的东西(当然很高兴被证明是错误的)。

相反,您可能必须以服务器 API 为目标,例如 Apache 的看起来像是对请求处理的合理介绍,这将是您的重要组成部分正在做。

作为替代方案,Lighttpd 可能对开发人员更加友好,并且(特别是如果您正在考虑性能) ) 快点。

我注意到有一个 cpp-netlib 正在开发中,但它似乎只是 HTTP 客户端。

In short, I don't think there is such a thing for generic server CGI programming (happy to be proven wrong of course).

Instead you'll probably have to target the server APIs, such as Apache's. This looks like a reasonable introduction to request processing, which will be a big part of what you're doing.

As an alternative, Lighttpd may be even more developer-friendly, and (particularly if you're looking at performance) faster.

I note there's a cpp-netlib under development but it seems to be HTTP client only.

半山落雨半山空 2024-07-16 12:47:14

我发现使用 CppCMS 开发快速 CGI 非常愉快em> 应用程序部署在 nginx 服务器中 - 尽管它从未投入生产 =( 。CppCMS 项目还包含一些库用于 SQL 连接。

I've found very pleasant to use CppCMS to develop a Fast CGI app to deploy in a nginx server - although it never went in production =( . The CppCMS project also includes some libraries for SQL connectivity.

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