2013-08-26 53 views
2

從GNU歸檔中下載並解壓縮libmicrohttpd後,我做了如下操作:./configure。但是,configure停止報告錯誤。以下是過去幾年相關線路:libmicrohttpd ./configure:不支持pthreads(osx)

checking for pthread_create in -lpthread... no 
checking if compiler supports -pthread... no 
checking if compiler supports -pthreads... no 
checking if compiler supports -threads... configure: error: Your system is not supporting pthreads! 

我在網上搜索,果然,看來OSX * 確實 *有pthreads,但是我無法找到configure報告錯誤,任何關於OSX沒有並行線程。

這裏是我的/usr/include的頂層lshttp://sprunge.us/DGgY

,這裏是相同的treehttp://sprunge.us/fVBV

+0

使用[Homebrew](http://brew.sh)而不是嘗試從頭開始構建 - 我只是檢查了它們,並且它們有一個libmicrohttpd的公式。 –

+0

@PaulR除了一件事之外,我工作得很好:我怎麼讓頭文件出現在'/ usr/include'中? – haneefmubarak

+0

它們位於/ usr/local/include - gcc會在那裏找到它們,或者您可以將它添加到包含路徑(-I)中。 –

回答

1

在OS X上更容易使用Homebrew,而不是試圖從頭構建 - 我只是檢查,他們有一個公式爲libmicrohttpd

注意,默認情況家釀使頭文件和庫/usr/local/include/usr/local/lib下 - GCC會發現庫和頭在這裏通過默認,或者如果你喜歡,你可以明確添加路徑(-I爲包括路徑,-L對庫路徑)。

+1

謝謝@PaulR! – haneefmubarak