cmake를 사용하여 Windows에서 libaws (http://sourceforge.net/projects/libaws/) 라이브러리를 컴파일하려고합니다. 나는 openssl, libxml, libcurl을 포함 시켰고 나는이 커맨드 라인을 사용하고있다.Windows7 pthread.h 찾을 수 없습니다.
C:\libaws>cmake -G "Visual Studio 10" -DCURL_LIBRARY="C:\tools\curl-7.28.1\lib" -DCURL_INCLUDE_DIR="C:\tools\curl-7.28.1\include" -DLIBXML2_LIBRARIES="C:\tools\libxml22.7.8.win32\lib" -DLIBXML2_INCLUDE_DIR="C:\tools\libxml2-2.7.8.win32\include" -DPTHREAD_INCLUDE_DIR="C:\tools\pthread\include" ..\tools\libaws-0.9.2
--
그것은 다음과 같은 오류가 발생합니다 : CMakeLists.txt에서
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found CURL: C:/tools/curl-7.28.1/lib (found version "7.28.1")
-- Found OpenSSL: optimized;C:/openssl/lib/ssleay32.lib;debug;C:/openssl/lib/ssleay32.lib;optimized;C:/openssl/lib/libeay32.lib;debug;C:/openssl/lib/libeay32.lib (found version "1.0.1c")
-- Found LibXml2: C:/tools/libxml2-2.7.8.win32/lib (found version "2.7.8")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found.
CMake 오류 : 78 (MESSAGE) : 는 pthread와 개발 헤더
내가 ptherad.h을 포함 한을 찾을 수 없습니다를, C : \ tools \ pthread \ include에 semaphore.h 등을 추가하고 -DPTHREAD_INCLUDE_DIR = "C : \ tools \ pthread \ include"명령 줄 플래그로 제공합니다. 내 CMakeLists.txt에 추가했습니다.
INCLUDE_DIRECTORIES(${PTHREAD_INCLUDE_DIR})
아이디어가 있습니까?
나는 답을 모른다. 그러나 "P-Thread"의 "P"가 그와 관련이있을 수도 있다고 생각한다. – Mehrdad
나는 당신을 얻지 못했다. 이거 어디서 언급 한거야? – Rajat
"P"는 POSIX를 나타냅니다. Windows는 POSIX 시스템이 아니므로 대부분의 컴파일러는 Windows에서 POSIX 기반 API를 제공하지 않습니다. – Mehrdad