Warm tip: This article is reproduced from serverfault.com, please click

其他-Windows 上的 PHP 7.4.2 [扩展] 构建错误

(其他 - PHP 7.4.2 [extension] build errors on Windows)

发布于 2020-02-18 14:09:57

我正在使用一个包(SAP RFC 连接器)一段时间,它是从这里检索的https://github.com/gkralik/php7-sapnwrfc

该包在所有 PHP 版本上都按预期工作,直到 7.4.2 和源代码构建。

我已经建立了php_sapnwrfc.dll从两个源VS2015VS2019,但我无法得到它的这些错误是由于工作,我是无法解决。

对于构建,我使用了以下程序:

  1. https://gkralik.github.io/php7-sapnwrfc/building.html#building-on-windows
  2. https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2

有没有人知道如何解决这个问题?

VS2019 中,我收到此错误,但没有人知道它的含义,尤其是带有核心编号的警告

Warning: PHP Startup:
Can't load module 'C:/ownprograms/wamp/bin/php/php7.4.2/ext/php_sapnwrfc.dll' as it's linked with 14.24, but the core is linked with 14.16 in Unknown on line 0

使用VS2015我得到这个错误,但这是由于编译器。

[17-Feb-2020 10:48:43 UTC] PHP Warning:  PHP Startup: sapnwrfc: Unable to initialize module
Module compiled with build ID=API20190902,TS,VS16
PHP    compiled with build ID=API20190902,TS,VC15
These options need to match

PHP 版本:7.4.2 TS

任何帮助,将不胜感激。

Questioner
Szabi Zsoldos
Viewed
0
Szabi Zsoldos 2020-02-19 21:14:09

有人解决了我的问题,这是他的回复。

尝试使用附加的 DLL。我已经为 7.4.2 和 7.4.3 构建了它,扩展版本为 1.3.0、vc15、ts 和 x64。它应该工作。php_sapnwrfc.zip

对于除 master 分支之外的任何 PHP 版本 > 7.2,你需要使用 VC15(Visual Studio 2017)。我在你的跟踪中看到你使用的是 VC16(Visual Studio 2019)。

我可以确认我尝试使用 VS2015 和 VS2019 构建它,而不是使用 VS2017。

谢谢,问题已解决。