alexott / boost-asio-examples Goto Github PK
View Code? Open in Web Editor NEWSource code for examples from article "What is Boost.Asio, and why we should use it", http://alexott.net/en/cpp/BoostAsioNotes.html
Source code for examples from article "What is Boost.Asio, and why we should use it", http://alexott.net/en/cpp/BoostAsioNotes.html
Hello Alex,
You've done a great job by writing these examples! Helped me a lot to learn Boost::Asio
concepts.
I have a question. Could you please clarify the use of vector<boost::thread>
instead of thread_group
?
Using thread_group
would be a bit easy and straightforward. Is it your own decision or there is something to it?
Thanks!
Thanks for the initiatives in the first place. Here is the information for your reference.
* The Boost library was installed with brew install boost
.
In short, the current code has "Undefined symbols" errors for the steps
mkdir build
cd build
cmake ..
make
$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found suitable version "1.81.0", minimum required is "1.42.0") found components: system thread regex
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/aa/R/boost-asio-examples/build
$ make
[ 20%] Linking CXX executable test-otpc
Undefined symbols for architecture x86_64:
"boost::scoped_static_mutex_lock::scoped_static_mutex_lock(boost::static_mutex&, bool)", referenced from:
boost::object_cache<boost::re_detail_500::cpp_regex_traits_base<char>, boost::re_detail_500::cpp_regex_traits_implementation<char>>::get(boost::re_detail_500::cpp_regex_traits_base<char> const&, unsigned long) in test-otpc-conn.cpp.o
boost::cpp_regex_traits<char>::get_catalog_name() in test-otpc-conn.cpp.o
boost::re_detail_500::mem_block_cache::get() in test-otpc-conn.cpp.o
boost::re_detail_500::mem_block_cache::put(void*) in test-otpc-conn.cpp.o
"boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()", referenced from:
boost::object_cache<boost::re_detail_500::cpp_regex_traits_base<char>, boost::re_detail_500::cpp_regex_traits_implementation<char>>::get(boost::re_detail_500::cpp_regex_traits_base<char> const&, unsigned long) in test-otpc-conn.cpp.o
boost::cpp_regex_traits<char>::get_catalog_name() in test-otpc-conn.cpp.o
boost::re_detail_500::mem_block_cache::get() in test-otpc-conn.cpp.o
boost::re_detail_500::mem_block_cache::put(void*) in test-otpc-conn.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]: *** [test-otpc] Error 1
make[1]: *** [CMakeFiles/test-otpc.dir/all] Error 2
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.