我正在尝试在最新的 Mac OS 上为 php 7.4 安装 pecl mongodb 和 memcached 扩展。
得到同样的错误:
pecl install memcached
...
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/libtool --mode=compile cc -I/usr/local/Cellar/php/7.4.11/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/include/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include -I/usr/local/opt/php@7.4/include -DHAVE_CONFIG_H -g -O2 -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/inclu
de/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c -o php_memcached.lo
mkdir .libs
cc -I/usr/local/Cellar/php/7.4.11/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include …Run Code Online (Sandbox Code Playgroud) 线程由启动std::async(func).
如果没有,我该怎么办?
要链接静态库,我必须从 .h 和 .c 文件创建 .lib。然后我将其添加到我的项目中,放入附加依赖项并进行编译。
要使用 dll,我需要 .dll 和 .lib。这个.lib和上面的一样还是不一样?如何让 Visual Studio 使用 .dll 和 .lin,而不仅仅是 .lib?我将 .dll 放入项目目录中,但没有任何更改(.exe 具有相同的大小(我认为应该更小))。
c++ ×2
c++11 ×1
cmake ×1
concurrency ×1
dll ×1
javascript ×1
jquery ×1
macos ×1
pecl ×1
php ×1