I'm a new user in oatpp, when I want to create my first demo with oatpp that is saying pthread_create undecalare in liboatpp.a. I had searched some soluve but haven't result;
These is my output after make my project :
[100%] Linking CXX executable /home/ubuntu/PictureBook/bin/RequestTest
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/RequestTest.dir/link.txt --verbose=1
/usr/bin/c++ -rdynamic CMakeFiles/RequestTest.dir/tests/RequestHandleTest.cpp.o -o /home/ubuntu/PictureBook/bin/RequestTest -L/usr/local/lib -L/usr/local/lib/oatpp-1.3.0 -Wl,-rpath,/usr/local/lib:/usr/local/lib/oatpp-1.3.0 -lpthread -loatpp
/usr/bin/ld: /usr/local/lib/oatpp-1.3.0/liboatpp.a(Server.cpp.o): in function `std::thread::thread<void (&)(oatpp::network::Server*), oatpp::network::Server*, void>(void (&)(oatpp::network::Server*), oatpp::network::Server*&&)':
/usr/include/c++/9/thread:126: undefined reference to `pthread_create'
/usr/bin/ld: /usr/local/lib/oatpp-1.3.0/liboatpp.a(HttpConnectionHandler.cpp.o): in function `std::thread::thread<void (oatpp::web::server::HttpProcessor::Task::*)(), oatpp::web::server::HttpProcessor::Task, void>(void (oatpp::web::server::HttpProcessor::Task::*&&)(), oatpp::web::server::HttpProcessor::Task&&)':
/usr/include/c++/9/thread:126: undefined reference to `pthread_create'
/usr/bin/ld: /usr/local/lib/oatpp-1.3.0/liboatpp.a(Thread.cpp.o): in function `oatpp::concurrency::setThreadAffinityToCpuRange(unsigned long, int, int)':
/home/ubuntu/apps/oatpp/src/oatpp/core/concurrency/Thread.cpp:57: undefined reference to `pthread_setaffinity_np'
collect2: error: ld returned 1 exit status
What should I do with cmake or rebuild the oatpp?
Thank you!
I'm a new user in oatpp, when I want to create my first demo with oatpp that is saying
pthread_create
undecalare inliboatpp.a
. I had searched some soluve but haven't result;These is my output after make my project :
What should I do with cmake or rebuild the oatpp? Thank you!
These is
CMakeList.txt
: