1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
% sh compile.sh
-- Conan: Adjusting output directories
-- Conan: Using cmake targets configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: /Users/emcp/Dev/git/EMCP/cpp-multithreading-in-action/ch09_00_threadpool_simple/build
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/emcp/Dev/git/EMCP/cpp-multithreading-in-action/ch09_00_threadpool_simple/build
Scanning dependencies of target test_cpp_multi
[ 25%] Building CXX object CMakeFiles/test_cpp_multi.dir/src/function_wrapper.cpp.o
[ 50%] Building CXX object CMakeFiles/test_cpp_multi.dir/src/threadsafe_queue.cpp.o
[ 75%] Building CXX object CMakeFiles/test_cpp_multi.dir/src/helloworld.cpp.o
[100%] Linking CXX executable bin/test_cpp_multi
Undefined symbols for architecture x86_64:
"function_wrapper::function_wrapper(function_wrapper const&)", referenced from:
threadsafe_queue<function_wrapper>::push(function_wrapper) in threadsafe_queue.cpp.o
void std::__1::deque<function_wrapper, std::__1::allocator<function_wrapper> >::__append<std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l> >(std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l>, std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l>, std::__1::enable_if<__is_cpp17_forward_iterator<std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l> >::value, void>::type*) in threadsafe_queue.cpp.o
"function_wrapper::function_wrapper()", referenced from:
thread_pool::worker_thread() in helloworld.cpp.o
"function_wrapper::function_wrapper<std::__1::packaged_task<void ()> >(std::__1::packaged_task<void ()>&&)", referenced from:
std::__1::future<std::__1::result_of<void (* ())()>::type> thread_pool::submit<void (*)()>(void (*)()) in helloworld.cpp.o
"function_wrapper::function_wrapper(function_wrapper&)", referenced from:
threadsafe_queue<function_wrapper>::wait_and_pop() in threadsafe_queue.cpp.o
threadsafe_queue<function_wrapper>::try_pop() in threadsafe_queue.cpp.o
"function_wrapper::operator=(function_wrapper const&)", referenced from:
threadsafe_queue<function_wrapper>::wait_and_pop(function_wrapper&) in threadsafe_queue.cpp.o
threadsafe_queue<function_wrapper>::try_pop(function_wrapper&) in threadsafe_queue.cpp.o
std::__1::__deque_iterator<function_wrapper, function_wrapper*, function_wrapper&, function_wrapper**, long, 4096l> std::__1::copy<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l, function_wrapper, function_wrapper*, function_wrapper&, function_wrapper**, long, 4096l>(std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l>, std::__1::__deque_iterator<function_wrapper, function_wrapper const*, function_wrapper const&, function_wrapper const* const*, long, 4096l>, std::__1::__deque_iterator<function_wrapper, function_wrapper*, function_wrapper&, function_wrapper**, long, 4096l>) in threadsafe_queue.cpp.o
"function_wrapper::operator()()", referenced from:
thread_pool::worker_thread() in helloworld.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/test_cpp_multi] Error 1
make[1]: *** [CMakeFiles/test_cpp_multi.dir/all] Error 2
make: *** [all] Error 2
|