Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install php_sapnwrfc on windows using php 8.3.10 #161

Open
alamsyahrisky opened this issue Aug 9, 2024 · 1 comment
Open

install php_sapnwrfc on windows using php 8.3.10 #161

alamsyahrisky opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels

Comments

@alamsyahrisky
Copy link

alamsyahrisky commented Aug 9, 2024

Question

I'm try on php 8.3.10 and nwrfc library version

NW RFC Library Version: 750 Patch Level 8
Compiler Version:
180040665 (VVRRPPPPP. Microsoft (R) C/C++ Compiler)
Startrfc Version: 2018-08-15

I tried following step by step from https://gkralik.github.io/php7-sapnwrfc/building.html

but when running the command "nmake" an error like this occurs

image

Microsoft (R) Program Maintenance Utility Version 14.29.30154.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "cl.exe" /I "C:\nwrfcsdk\include" /DHAVE_SAPNWRFC_H=1 /D ZEND_COMPILE_DL_EXT=1 /D COMPILE_DL_SAPNWRFC /D SAPNWRFC_EXPORTS=1 -DSAPonNT -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_AFXDLL -DWIN32 -D_WIN32_WINNT=0x0502 -DWIN64 -D_AMD64_ -DNDEBUG -DSAPwithUNICODE -DUNICODE -D_UNICODE -DSAPwithTHREADS -EHs -Gy -J -MD -nologo -W3 -Z7 -D_ATL_ALLOW_CHAR_UNSIGNED -GL -O2 -Oy- /we4552 /we4700 /we4789 /nologo /I C:\workspace\php-8.3.10-devel-vs16-x64/include /I C:\workspace\php-8.3.10-devel-vs16-x64/include/main /I C:\workspace\php-8.3.10-devel-vs16-x64/include/Zend /I C:\workspace\php-8.3.10-devel-vs16-x64/include/TSRM /I C:\workspace\php-8.3.10-devel-vs16-x64/include/ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Zc:__cplusplus /d2FuncCache1 /Zc:wchar_t /MP /LD /MD /Ox /D NDebug /D NDEBUG /GF /D ZEND_DEBUG=0 /I "C:\workspace\php-sapnwrf-2\no\include" /FoC:\workspace\php-sapnwrf-2\x64\Release\\ /FpC:\workspace\php-sapnwrf-2\x64\Release\\ /FRC:\workspace\php-sapnwrf-2\x64\Release\\ /FdC:\workspace\php-sapnwrf-2\x64\Release\\ /c C:\workspace\php-sapnwrf-2\exceptions.c C:\workspace\php-sapnwrf-2\rfc_parameters.c C:\workspace\php-sapnwrf-2\sapnwrfc.c C:\workspace\php-sapnwrf-2\string_helper.c
exceptions.c
rfc_parameters.c
sapnwrfc.c
string_helper.c
C:\workspace\php-8.3.10-devel-vs16-x64\include\Zend\zend_gc.h(155): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\Zend\zend_gc.h(155): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\Zend\zend_gc.h(155): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\Zend\zend_gc.h(155): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\rfc_parameters.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\exceptions.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\string_helper.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main\config.w32.h(148): warning C4005: 'PHP_BUILD_SYSTEM': macro redefinition (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-8.3.10-devel-vs16-x64\include\main/config.pickle.h(2): note: see previous definition of 'PHP_BUILD_SYSTEM' (compiling source file C:\workspace\php-sapnwrf-2\sapnwrfc.c)
C:\workspace\php-sapnwrf-2\rfc_parameters.c(1587): warning C4018: '<': signed/unsigned mismatch
C:\workspace\php-sapnwrf-2\sapnwrfc.c(788): warning C4013: 'RfcSetGlobalLogonTimeout' undefined; assuming extern returning int
        rc /nologo  /I C:\workspace\php-8.3.10-devel-vs16-x64/include /I C:\workspace\php-8.3.10-devel-vs16-x64/include/main /I C:\workspace\php-8.3.10-devel-vs16-x64/include/Zend /I C:\workspace\php-8.3.10-devel-vs16-x64/include/TSRM /I C:\workspace\php-8.3.10-devel-vs16-x64/include/ext /I C:\workspace\php-8.3.10-devel-vs16-x64/include /n /fo C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.dll.res /d FILE_DESCRIPTION="\"php_sapnwrfc.dll\"" /d FILE_NAME="\"php_sapnwrfc.dll\"" /d URL="\"https://www.php.net\"" /d INTERNAL_NAME="\"SAPNWRFC extension\"" /d THANKS_GUYS="\"\"" C:\workspace\php-8.3.10-devel-vs16-x64\build\template.rc
        "link.exe" @"C:\workspace\php-sapnwrf-2\x64\Release\resp\SAPNWRFC_GLOBAL_OBJS.txt" C:\workspace\php-8.3.10-devel-vs16-x64\lib\php8.lib libsapucum.lib sapnwrfc.lib kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib psapi.lib bcrypt.lib C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.dll.res /out:C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.dll /dll /nologo /GUARD:CF /d2:-AllowCompatibleILVersions /libpath:"\"C:\workspace\php-sapnwrf-2\no\lib\"" /libpath:"C:\workspace\php-8.3.10-devel-vs16-x64\lib\;C:\workspace\php-8.3.10-devel-vs16-x64" /libpath:"..\..\nwrfcsdk\lib" /libpath:"..\..\nwrfcsdk\lib" -NXCOMPAT -STACK:0x2000000 -SWAPRUN:NET -DEBUG -OPT:REF -DEBUGTYPE:CV,FIXUP -nologo -LTCG
   Creating library C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.lib and object C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.exp
sapnwrfc.obj : error LNK2001: unresolved external symbol RfcSetGlobalLogonTimeout
C:\workspace\php-sapnwrf-2\x64\Release\php_sapnwrfc.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe"' : return code '0x460'
Stop.
@gkralik
Copy link
Owner

gkralik commented Aug 9, 2024

Known issue & fix is coming. Use the latest SDK patch level for now.

@gkralik gkralik self-assigned this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants