* [Comm] Fwd: Re: [devel] icinga2
@ 2017-01-02 15:41 ` Anton Gorlov
2017-01-02 16:14 ` Anton Gorlov
0 siblings, 1 reply; 4+ messages in thread
From: Anton Gorlov @ 2017-01-02 15:41 UTC (permalink / raw)
To: ALT Linux Community
Знатоки boost/cmake отзовитесь пожалуйста.
-------- Перенаправленное сообщение --------
Тема: Re: [devel] icinga2
Дата: Mon, 2 Jan 2017 17:43:55 +0300
От: Anton Gorlov <stalker@altlinux.ru>
Отвечать: ALT Linux Team development discussions <devel@lists.altlinux.org>
Кому: ALT Linux Team development discussions <devel@lists.altlinux.org>
Самое интересное - эту либу оно таки видит
То есть если в CMakeLists.txt добавить
FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
то в логе вижу
===
-- Found the following Boost libraries:
-- program_options
-- Configuring done
===
А вот здесь оно не срабатывает судя по всему или не доавляет в список либ.
target_link_libraries(icinga-app ${Boost_LIBRARIES} base config cli)
и вот ещё в глаза бросается
в build/icinga-app/CMakeFiles/icinga-app.dir,в link.txt вижу вместо
-lboost_program_options некий -lboost_program_options-mt
02.01.2017 12:50, Anton Gorlov пишет:
> Так а как в cmake правильно фиксить ошибки типа
>
> [100%] Building CXX object icinga-app/CMakeFiles/icinga-app.dir/icinga.cpp.o
> Linking CXX executable ../Bin/Release/icinga2
> CMakeFiles/icinga-app.dir/icinga.cpp.o: In function `Main()':
> /tmp/1/icinga2-2.6.0/icinga-app/icinga.cpp:174: undefined reference to
> `boost::program_options::options_description::options_description(std::string
> const&, unsigned int, unsigned int)'
> /tmp/1/icinga2-2.6.0/icinga-app/icinga.cpp:190: undefined reference to
> `boost::program_options::options_description::options_description(std::string
> const&, unsigned int, unsigned int)'
> CMakeFiles/icinga-app.dir/icinga.cpp.o: In function
> `boost::program_options::variables_map::operator[](std::string const&)
> const':
> /usr/include/boost/program_options/variables_map.hpp:155: undefined
> reference to
> `boost::program_options::abstract_variables_map::operator[](std::string
> const&) const'
>
_______________________________________________
Devel mailing list
Devel@lists.altlinux.org
https://lists.altlinux.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] Fwd: Re: [devel] icinga2
2017-01-02 15:41 ` [Comm] Fwd: Re: [devel] icinga2 Anton Gorlov
@ 2017-01-02 16:14 ` Anton Gorlov
2017-01-02 16:17 ` Michael Shigorin
0 siblings, 1 reply; 4+ messages in thread
From: Anton Gorlov @ 2017-01-02 16:14 UTC (permalink / raw)
To: ALT Linux Community
В общем помогло переключиться на 5 cpp
02.01.2017 18:41, Anton Gorlov пишет:
> Знатоки boost/cmake отзовитесь пожалуйста.
>
>
> -------- Перенаправленное сообщение --------
> Тема: Re: [devel] icinga2
> Дата: Mon, 2 Jan 2017 17:43:55 +0300
> От: Anton Gorlov <stalker@altlinux.ru>
> Отвечать: ALT Linux Team development discussions <devel@lists.altlinux.org>
> Кому: ALT Linux Team development discussions <devel@lists.altlinux.org>
>
> Самое интересное - эту либу оно таки видит
>
> То есть если в CMakeLists.txt добавить
> FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
>
> то в логе вижу
>
> ===
> -- Found the following Boost libraries:
> -- program_options
> -- Configuring done
> ===
>
> А вот здесь оно не срабатывает судя по всему или не доавляет в список либ.
>
> target_link_libraries(icinga-app ${Boost_LIBRARIES} base config cli)
>
> и вот ещё в глаза бросается
>
> в build/icinga-app/CMakeFiles/icinga-app.dir,в link.txt вижу вместо
> -lboost_program_options некий -lboost_program_options-mt
>
>
>
> 02.01.2017 12:50, Anton Gorlov пишет:
>> Так а как в cmake правильно фиксить ошибки типа
>>
>> [100%] Building CXX object icinga-app/CMakeFiles/icinga-app.dir/icinga.cpp.o
>> Linking CXX executable ../Bin/Release/icinga2
>> CMakeFiles/icinga-app.dir/icinga.cpp.o: In function `Main()':
>> /tmp/1/icinga2-2.6.0/icinga-app/icinga.cpp:174: undefined reference to
>> `boost::program_options::options_description::options_description(std::string
>> const&, unsigned int, unsigned int)'
>> /tmp/1/icinga2-2.6.0/icinga-app/icinga.cpp:190: undefined reference to
>> `boost::program_options::options_description::options_description(std::string
>> const&, unsigned int, unsigned int)'
>> CMakeFiles/icinga-app.dir/icinga.cpp.o: In function
>> `boost::program_options::variables_map::operator[](std::string const&)
>> const':
>> /usr/include/boost/program_options/variables_map.hpp:155: undefined
>> reference to
>> `boost::program_options::abstract_variables_map::operator[](std::string
>> const&) const'
>>
>
> _______________________________________________
> Devel mailing list
> Devel@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel
> _______________________________________________
> community mailing list
> community@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/community
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-02 16:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 15:41 ` [Comm] Fwd: Re: [devel] icinga2 Anton Gorlov
2017-01-02 16:14 ` Anton Gorlov
2017-01-02 16:17 ` Michael Shigorin
2017-01-02 16:19 ` Anton Gorlov
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git