lighttpd-cpp如何编译?

发布于 2024-11-06 22:47:37 字数 4112 浏览 7 评论 0原文

我试图为lighttpd创建我自己的模块,几分钟后我发现这都是c语言的!我需要地图和我用 C++ 制作的其他一些类。所以我遇到 http://redmine.lighttpd.net/wiki/lighttpd/CppModules还有 http://redmine.lighttpd.net/wiki/lighttpd/CppHelperClasses 有(对于 lighttpd-cpp)一个 Mercurial 项目,其中编写了一些演示模块,但没有解释如何复制并将它们集成到lighttpd环境中..这些也在/src/目录中没有编译(显然,所有依赖项都丢失了..

src]# cpp mod_blank.cpp -o a
In file included from mod_blank.cpp:5:
mod_blank.hpp:5:35: error: lighttpd-cpp/plugin.hpp: No such file or directory
mod_blank.hpp:7:30: error: boost/mpl/list.hpp: No such file or directory

有人有一些想法吗?类似的经验或其他方式来做使用c++的custome模块?

更新

感谢messa,我已经安装了scons,尝试编译,我得到了这些错误

./include/lighttpd-cpp/datatype_helpers.hpp:86: error: invalid conversion from 'long unsigned int' to 'config_values_type_t'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<short int, 2ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = short int, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<short int>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<short int, 2ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<bool, 4ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = bool, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<bool>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<bool, 4ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<int, 3ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = int, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<int>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<int, 3ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1ul>::value_enum'

我正在运行centos 5.5 64位我已经在这里编译并安装了lighttpd的版本,我也不明白它的作用是什么lighttpd-cpp 在使用 cpp 构建新的 lighttpd 模块时,我必须从 lighttpd-cpp 构建所有内容并使用此版本而不是我的 lighttpd 1.4.28 从http://www.lighttpd.net/下载?如果是的话,那很遗憾,因为我可能会使用未经充分测试的lighttpd源来失去更新和版本稳定性,相反,如果我必须在旧lighttpd中实现新模块,该怎么做? :)

I was trying to create my own module for lighttpd, after some minutes i've discovered that this is all in c! and i need maps and some other class i've made in c++. so i come across http://redmine.lighttpd.net/wiki/lighttpd/CppModules and also http://redmine.lighttpd.net/wiki/lighttpd/CppHelperClasses there is (for lighttpd-cpp) a mercurial project with some demo modules written here, but no explanation on how to copile and integrate these in the lighttpd environment.. these also in the /src/ directory didn't compile (obviously, all dependancies are missing..

src]# cpp mod_blank.cpp -o a
In file included from mod_blank.cpp:5:
mod_blank.hpp:5:35: error: lighttpd-cpp/plugin.hpp: No such file or directory
mod_blank.hpp:7:30: error: boost/mpl/list.hpp: No such file or directory

anyone have some idea? similar experience or other way to do a custome module using c++ ?

Update

Thanks to messa i have installed scons, tryed to compile and i got these errors

./include/lighttpd-cpp/datatype_helpers.hpp:86: error: invalid conversion from 'long unsigned int' to 'config_values_type_t'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<short int, 2ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = short int, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<short int>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<short int, 2ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<bool, 4ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = bool, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<bool>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<bool, 4ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<int, 3ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = int, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<int>]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<int, 3ul>::value_enum'
./include/lighttpd-cpp/datatype_helpers.hpp: In instantiation of 'const config_values_type_t config_option_traits_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1ul>::value_enum':
./include/lighttpd-cpp/datatype_helpers.hpp:347:   instantiated from 'handler_t config_option<OptionType, ConfigScopeType, OptionTraits>::set_defaults(const server&) [with OptionType = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int ConfigScopeType = 2ul, OptionTraits = config_option_traits<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
src/mod_blank.cpp:6:   instantiated from here
./include/lighttpd-cpp/datatype_helpers.hpp:243: error: uninitialized const 'config_option_traits_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1ul>::value_enum'

i'm running centos 5.5 64bit i have already a version of lighttpd compiled and installed here, also i didn't understood what's the role of lighttpd-cpp in building new lighttpd modules using cpp, i have to build everything from lighttpd-cpp and use this version instead of my lighttpd 1.4.28 downloaded from http://www.lighttpd.net/? if yes that's sad because i may loose updates and version stability using not so well tested lighttpd source, and instead, if i have to implement then new modules in old lighttpd, how to do that? :)

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

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

发布评论

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

评论(1

雨落星ぅ辰 2024-11-13 22:47:37

您编译错误 - 缺少头文件的路径。您应该使用构建系统,如果是 lighttpd-cpp,则为 SCons。安装 scons,然后继续阅读 README :)

You are compiling it wrong - paths to header files are missing. You should use a build system, which is SCons in case of lighttpd-cpp. Install scons and then continue with README :)

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