diff --git a/build/chat.pro b/build/chat.pro index 8acbdfb..eff70a8 100644 --- a/build/chat.pro +++ b/build/chat.pro @@ -15,3 +15,5 @@ SOURCES += \ LIBS += \ -L$${DESTDIR} -lipc + +unix:LIBS += -lrt -lpthread diff --git a/build/ipc.pro b/build/ipc.pro index f9adb70..88889c3 100644 --- a/build/ipc.pro +++ b/build/ipc.pro @@ -53,8 +53,6 @@ SOURCES += \ ../src/platform/shm_linux.cpp \ ../src/platform/tls_pointer_linux.cpp -LIBS += -lrt - target.path = /usr/lib INSTALLS += target diff --git a/build/test.pro b/build/test.pro index 51b65b6..9703411 100644 --- a/build/test.pro +++ b/build/test.pro @@ -34,3 +34,5 @@ SOURCES += \ LIBS += \ -L$${DESTDIR} -lipc + +unix:LIBS += -lrt -lpthread diff --git a/demo/chat/main.cpp b/demo/chat/main.cpp index c560aae..8065181 100644 --- a/demo/chat/main.cpp +++ b/demo/chat/main.cpp @@ -21,8 +21,11 @@ int main() { auto buf = cc.recv(); if (buf.empty()) continue; std::string dat { static_cast(buf.data()), buf.size() - 1 }; - if (dat == quit__) return; - std::cout << dat << std::endl; + if (dat == quit__) { + std::cout << "receiver quit..." << std::endl; + return; + } + std::cout << "> " << dat << std::endl; } }};