Доброго времени суток. Возникла проблема при сборке проекта под Ubuntu 16.04 и 14.04. При этом, под арчем (с версией boost 1.63) и под генту (с версией boost 1.56) проект собирается нормально.
Вот Makefile:
CC = g++
CFLAGS = -c -std=c++11 -Wall -Wextra
LFLAGS = -lboost_system -lboost_thread -lpthread
all: server client
server: servermain.o daemon.o
$(CC) $(LFLAGS) servermain.o daemon.o -o frtpdaemon
servermain.o: server/main.cpp
$(CC) $(CFLAGS) server/main.cpp -o servermain.o
clog.o: server/clog.hpp
$(CC) $(CFLAGS) server/clog.hpp -o clog.o
parser.o: server/cparser.hpp
$(CC) $(CFLAGS) server/cparser.hpp -o parser.o
daemon.o: server/cdaemon.cpp server/cdaemon.h
$(CC) $(CFLAGS) server/cdaemon.cpp -o daemon.o
client: clientmain.o client.o
$(CC) $(LFLAGS) -shared clientmain.o client.o -o libfrtpsrv.so
clientmain.o: client/main.cpp
$(CC) $(CFLAGS) -fpic client/main.cpp -o clientmain.o
client.o: client/cclient.cpp client/cclient.h
$(CC) $(CFLAGS) -fpic client/cclient.cpp -o client.o
clean:
rm *.o frtpdaemon libfrtpsrv.so
servermain.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x1de): undefined reference to `boost::system::generic_category()'
main.cpp:(.text+0x1ea): undefined reference to `boost::system::generic_category()'
main.cpp:(.text+0x1f6): undefined reference to `boost::system::system_category()'
servermain.o: In function `boost::asio::error::get_system_category()':
main.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[_ZN5boost4asio5error19get_system_categoryEv]+0x5): undefined reference to `boost::system::system_category()'
daemon.o: In function `__static_initialization_and_destruction_0(int, int)':
cdaemon.cpp:(.text+0x16bb): undefined reference to `boost::system::generic_category()'
cdaemon.cpp:(.text+0x16c7): undefined reference to `boost::system::generic_category()'
cdaemon.cpp:(.text+0x16d3): undefined reference to `boost::system::system_category()'
daemon.o: In function `boost::system::error_code::error_code()':
cdaemon.cpp:(.text._ZN5boost6system10error_codeC2Ev[_ZN5boost6system10error_codeC5Ev]+0x17): undefined reference to `boost::system::system_category()'
daemon.o: In function `boost::asio::detail::posix_signal_blocker::posix_signal_blocker()':
cdaemon.cpp:(.text._ZN5boost4asio6detail20posix_signal_blockerC2Ev[_ZN5boost4asio6detail20posix_signal_blockerC5Ev]+0x64): undefined reference to `pthread_sigmask'
daemon.o: In function `boost::asio::detail::posix_signal_blocker::~posix_signal_blocker()':
cdaemon.cpp:(.text._ZN5boost4asio6detail20posix_signal_blockerD2Ev[_ZN5boost4asio6detail20posix_signal_blockerD5Ev]+0x2d): undefined reference to `pthread_sigmask'
collect2: error: ld returned 1 exit status