libmicrohttpd ./configure:不支持pthreads(osx)
问题描述:
从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
的顶层ls
:http://sprunge.us/DGgY
,这里是相同的tree
:http://sprunge.us/fVBV
答
在OS X上更容易使用Homebrew,而不是试图从头构建 - 我只是检查,他们有一个公式为libmicrohttpd
。
注意,默认情况家酿使头文件和库/usr/local/include
和/usr/local/lib
下 - GCC会发现库和头在这里通过默认,或者如果你喜欢,你可以明确添加路径(-I
为包括路径,-L
对库路径)。
+1
谢谢@PaulR! – haneefmubarak
使用[Homebrew](http://brew.sh)而不是尝试从头开始构建 - 我只是检查了它们,并且它们有一个libmicrohttpd的公式。 –
@PaulR除了一件事之外,我工作得很好:我怎么让头文件出现在'/ usr/include'中? – haneefmubarak
它们位于/ usr/local/include - gcc会在那里找到它们,或者您可以将它添加到包含路径(-I)中。 –