undefined reference to `boost::system::detail::generic_category_ncx()'

Hello all, I am new to boost. I try to use some boost files in my program, but I have trouble with some of them. For example compiling the following program #include <boost/log/expressions/formatters/date_time.hpp> int main() { return 0; } with the command g++ -std=c++11 test.cpp -o main -I/home/user101/boost/ -L/home/user101/boost I have a message like the following /tmp/ccm6UOud.o: In function `boost::system::generic_category()': test.cpp:(.text._ZN5boost6system16generic_categoryEv[_ZN5boost6system16generic_c ategoryEv]+0x5): undefined reference to `boost::system::detail::generic_category _ncx()' I also tried to append -lboost_system in the command, but I take back the following message: /usr/bin/ld: cannot find -lboost_system collect2: error: ld returned 1 exit status Could you please guide me with that? I use boost_1_67 if that makes any difference (which I do not think so). Thanks, Antonis

AMDG On 09/20/2018 02:59 AM, Antonis Polykratis via Boost-users wrote:
You're on the right track here, but you need to build boost_system and add it to the linker path before you can use it. See: https://www.boost.org/more/getting_started/unix-variants.html#prepare-to-use... In Christ, Steven Watanabe
participants (2)
-
Antonis Polykratis
-
Steven Watanabe