Can anyone tell me how to add pthread win32 to program the use CMake to build I added the following to Cmake List but still not working
cmake_minimum_required(VERSION 3.5)
project(FlexibleComputerLanguage)
set(CMAKE_CXX_STANDARD 17)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
include_directories("C:/Users/Tharindu/Downloads/Compressed/pthread")
include_directories("C:/Users/Tharindu/Downloads/Compressed/pthread/x86")
target_link_libraries(FlexibleComputerLanguage1 Threads::Threads)
But I am getting the following error
Command.cpp.obj : error LNK2019: unresolved external symbol "char * __cdecl strptime(char const * __restrict,char const * __restrict,struct tm * __restrict)" (?strptime@@YAPADPIBD0PIAUtm@@@Z) referenced in function "private: class Entity * __thiscall Command::ExecuteStringCommand(unsigned long,class Entity *,class Entity *)" (?ExecuteStringCommand@Command@@AAEPAVEntity@@KPAV2@0@Z)
MongoTP.cpp.obj : error LNK2001: unresolved external symbol "char * __cdecl strptime(char const * __restrict,char const * __restrict,struct tm * __restrict)" (?strptime@@YAPADPIBD0PIAUtm@@@Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__pthread_create referenced in function __catch$?processSlave@@YAPAXPAX@Z$0
main.cpp.obj : error LNK2019: unresolved external symbol __imp__pthread_join referenced in function __catch$?processSlave@@YAPAXPAX@Z$0
main.cpp.obj : error LNK2019: unresolved external symbol __imp__pthread_mutex_init referenced in function __catch$?processSlave@@YAPAXPAX@Z$0
main.cpp.obj : error LNK2019: unresolved external symbol __imp__pthread_mutex_lock referenced in function __catch$?processTDPQuery@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV?$GenericDocument@U?$UTF8@D@rapidjson@@V?$MemoryPoolAllocator@VCrtAllocator@rapidjson@@@2@VCrtAllocator@2@@rapidjson@@@Z$4
main.cpp.obj : error LNK2019: unresolved external symbol __imp__pthread_mutex_unlock referenced in function __catch$?processTDPQuery@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV?$GenericDocument@U?$UTF8@D@rapidjson@@V?$MemoryPoolAllocator@VCrtAllocator@rapidjson@@@2@VCrtAllocator@2@@rapidjson@@@Z$4
FlexibleComputerLanguage1.exe : fatal error LNK1120: 6 unresolved externals