lighttpd-cpp怎么编译?

时间:2011-05-15 00:18:48

标签: c++ lighttpd

我正在尝试为lighttpd创建自己的模块,几分钟后我发现这一切都在c中!我需要地图和其他一些我用c ++制作的课程。所以我遇到http://redmine.lighttpd.net/wiki/lighttpd/CppModuleshttp://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 ++做类似的经验或其他方式?

更新

感谢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中实现新的模块,该怎么做? :)

1 个答案:

答案 0 :(得分:4)

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