lighttpd-cpp как скомпилировать? - PullRequest
2 голосов
/ 15 мая 2011

Я пытался создать свой собственный модуль для lighttpd, через несколько минут я обнаружил, что все это в c! и мне нужны карты и какой-то другой класс, который я сделал в C ++. поэтому я сталкиваюсь с http://redmine.lighttpd.net/wiki/lighttpd/CppModules, а также http://redmine.lighttpd.net/wiki/lighttpd/CppHelperClasses есть (для lighttpd-cpp) ртутный проект с некоторыми демонстрационными модулями, написанными здесь, но без объяснения того, как их скопировать и интегрировать в среду 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 в создании новых модулей lighttpd с использованием cpp, я должен собрать все из lighttpd -cpp и использовать эту версию вместо моего lighttpd 1.4.28, загруженного с http://www.lighttpd.net/?, если да, это печально, потому что я могу потерять обновления и стабильность версии, используя не очень хорошо проверенный источник lighttpd, и вместо этого, если мне придется реализовать то новые модули в старом lighttpd, как это сделать? :)

1 Ответ

4 голосов
/ 15 мая 2011

Вы неправильно его компилируете - пути к заголовочным файлам отсутствуют. Вы должны использовать систему сборки, которая составляет SCons в случае lighttpd-cpp. Установите scons, а затем продолжайте с README :)

...