diff --git a/compiled_starters/cpp/CMakeLists.txt b/compiled_starters/cpp/CMakeLists.txt
index 4993f2b..62fb3b9 100644
--- a/compiled_starters/cpp/CMakeLists.txt
+++ b/compiled_starters/cpp/CMakeLists.txt
@@ -13,4 +13,5 @@ find_package(asio CONFIG REQUIRED)
 add_executable(server ${SOURCE_FILES})
 
 target_link_libraries(server PRIVATE asio asio::asio)
-target_link_libraries(server PRIVATE Threads::Threads)
\ No newline at end of file
+target_link_libraries(server PRIVATE Threads::Threads)
+target_link_libraries(server -pthread)
\ No newline at end of file
diff --git a/solutions/cpp/01-jm1/code/CMakeLists.txt b/solutions/cpp/01-jm1/code/CMakeLists.txt
index 4993f2b..62fb3b9 100644
--- a/solutions/cpp/01-jm1/code/CMakeLists.txt
+++ b/solutions/cpp/01-jm1/code/CMakeLists.txt
@@ -13,4 +13,5 @@ find_package(asio CONFIG REQUIRED)
 add_executable(server ${SOURCE_FILES})
 
 target_link_libraries(server PRIVATE asio asio::asio)
-target_link_libraries(server PRIVATE Threads::Threads)
\ No newline at end of file
+target_link_libraries(server PRIVATE Threads::Threads)
+target_link_libraries(server -pthread)
\ No newline at end of file
diff --git a/solutions/cpp/02-rg2/code/CMakeLists.txt b/solutions/cpp/02-rg2/code/CMakeLists.txt
index 4993f2b..62fb3b9 100644
--- a/solutions/cpp/02-rg2/code/CMakeLists.txt
+++ b/solutions/cpp/02-rg2/code/CMakeLists.txt
@@ -13,4 +13,5 @@ find_package(asio CONFIG REQUIRED)
 add_executable(server ${SOURCE_FILES})
 
 target_link_libraries(server PRIVATE asio asio::asio)
-target_link_libraries(server PRIVATE Threads::Threads)
\ No newline at end of file
+target_link_libraries(server PRIVATE Threads::Threads)
+target_link_libraries(server -pthread)
\ No newline at end of file
diff --git a/starter_templates/cpp/code/CMakeLists.txt b/starter_templates/cpp/code/CMakeLists.txt
index 4993f2b..62fb3b9 100644
--- a/starter_templates/cpp/code/CMakeLists.txt
+++ b/starter_templates/cpp/code/CMakeLists.txt
@@ -13,4 +13,5 @@ find_package(asio CONFIG REQUIRED)
 add_executable(server ${SOURCE_FILES})
 
 target_link_libraries(server PRIVATE asio asio::asio)
-target_link_libraries(server PRIVATE Threads::Threads)
\ No newline at end of file
+target_link_libraries(server PRIVATE Threads::Threads)
+target_link_libraries(server -pthread)
\ No newline at end of file