Last active
January 11, 2017 00:18
-
-
Save ahundt/db4677f71b6fa892d86c651776fa6d0b to your computer and use it in GitHub Desktop.
boost log error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
athundt at Andrews-2013-MacBook-Pro in ~/source/sandbox/build | |
○ brew info boost | |
boost: stable 1.63.0 (bottled), HEAD | |
Collection of portable C++ source libraries | |
https://www.boost.org/ | |
/usr/local/Cellar/boost/1.63.0 (12,491 files, 397.1M) * | |
Poured from bottle on 2017-01-10 at 18:41:08 | |
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb | |
==> Dependencies | |
Optional: icu4c ✔ | |
==> Requirements | |
Optional: mpi ✔ | |
==> Options | |
--c++11 | |
Build using C++11 mode | |
--universal | |
Build a universal binary | |
--with-icu4c | |
Build regexp engine with icu support | |
--with-mpi | |
Build with MPI support | |
--without-single | |
Disable building single-threading variant | |
--without-static | |
Disable building static library variant | |
--HEAD | |
Install HEAD version | |
athundt at Andrews-2013-MacBook-Pro in ~/source/sandbox/build | |
○ cmake .. | |
CMake Warning at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:744 (message): | |
Imported targets not available for Boost version 106300 | |
Call Stack (most recent call first): | |
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES) | |
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES) | |
CMakeLists.txt:5 (find_package) | |
CMake Warning at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:744 (message): | |
Imported targets not available for Boost version 106300 | |
Call Stack (most recent call first): | |
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES) | |
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES) | |
CMakeLists.txt:5 (find_package) | |
-- Boost version: 1.63.0 | |
-- Found the following Boost libraries: | |
-- log_setup | |
-- log | |
-- Configuring done | |
-- Generating done | |
-- Build files have been written to: /Users/athundt/source/sandbox/build | |
athundt at Andrews-2013-MacBook-Pro in ~/source/sandbox/build | |
○ make | |
Scanning dependencies of target main | |
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o | |
[100%] Linking CXX executable main | |
[100%] Built target main | |
athundt at Andrews-2013-MacBook-Pro in ~/source/sandbox/build | |
○ ./main | |
[2017-01-10 19:15:22.788453] [0x00007fff7d018000] [info] main function | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.5) | |
project (HELLO) | |
find_package(Boost COMPONENTS log_setup log) | |
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK) | |
add_executable(main main.cpp) | |
target_link_libraries(main ${Boost_LOG_SETUP_LIBRARY} ${Boost_LOG_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/log/trivial.hpp> | |
int main() | |
{ | |
BOOST_LOG_TRIVIAL(info) << "main function\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment