gpt4 book ai didi

c++ - lighttpd-cpp如何编译?

转载 作者:搜寻专家 更新时间:2023-10-31 01:19:30 26 4
gpt4 key购买 nike

我试图为 lighttpd 创建我自己的模块,几分钟后我发现这一切都在 c 中!我需要 map 和我用 C++ 制作的其他一些类(class)。所以我遇到了http://redmine.lighttpd.net/wiki/lighttpd/CppModules还有http://redmine.lighttpd.net/wiki/lighttpd/CppHelperClasses有(针对 lighttpd-cpp)一个 mercurial 项目,其中包含一些演示模块依赖项丢失..

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++ 制作客户模块的类似经验或其他方式?

更新

感谢 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 64bit 我已经在这里编译和安装了一个版本的 lighttpd,而且我不明白 lighttpd-cpp 在使用 cpp 构建新的 lighttpd 模块中的作用是什么,我必须从 lighttpd 构建所有内容-cpp 并使用此版本代替我从 http://www.lighttpd.net/ 下载的 lighttpd 1.4.28 ?如果是,那很可悲,因为我可能会使用未经过充分测试的 lighttpd 源失去更新和版本稳定性,相反,如果我必须在旧的 lighttpd 中实现新模块,该怎么做? :)

最佳答案

您编译错误 - 缺少头文件的路径。您应该使用构建系统,即 SCons 在 lighttpd-cpp 的情况下。安装 scons 然后继续 README :)

关于c++ - lighttpd-cpp如何编译?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6005656/

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