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

Unable to build in Windows: undetermined C.RfcGetInt8 #27

Closed
papibe opened this issue Oct 23, 2020 · 6 comments
Closed

Unable to build in Windows: undetermined C.RfcGetInt8 #27

papibe opened this issue Oct 23, 2020 · 6 comments

Comments

@papibe
Copy link

papibe commented Oct 23, 2020

Trying to build package:

PS C:\Users\ppiaggio\go\src\github.com\sap\gorfc\gorfc> go build
# github.com/sap/gorfc/gorfc
.\gorfc.go:816:8: could not determine kind of name for C.RfcGetInt8

Environment:

PS C:\Users\ppiaggio\go\src\github.com\sap\gorfc\gorfc> echo $env:Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Go\bin;C:\Program Files\Git\cmd;C:\Users\ppiaggio\AppData\Local\Microsoft\WindowsApps;C:\Users\ppiaggio\go\bin;C:\Users\ppiaggio\win-build\bin;C:\Users\ppiaggio\win-build\bin;C:\Tools\nwrfcsdk\lib\

PS C:\Users\ppiaggio\go\src\github.com\sap\gorfc\gorfc> echo $env:SAPNWRFC_HOME
C:\Tools\nwrfcsdk

NetWeaver installation:

PS C:\Users\ppiaggio\go\src\github.com\sap\gorfc\gorfc> ls $env:SAPNWRFC_HOME


    Directory: C:\Tools\nwrfcsdk


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       10/10/2019   4:58 AM                bin
d-----       10/10/2019   4:58 AM                demo
d-----       10/10/2019   4:58 AM                doc
d-----       10/10/2019   4:58 AM                include
d-----       10/10/2019   4:58 AM                lib
@bsrdjan
Copy link
Contributor

bsrdjan commented Oct 23, 2020

You might be using the older SAP NWRFC SDK, without RfcGetInt8 API. The error should not occur with the current SDK version, 7.57.

@papibe
Copy link
Author

papibe commented Oct 23, 2020

Thanks for your answer. I updated the SAP NWRFC SDK to nwrfc750P_7-70002755.zip.

The previous error is gone, but the package still does not build:

PS C:\Users\ppiaggio\go\src\github.com\sap\gorfc\gorfc> go build .
# github.com/sap/gorfc/gorfc
In file included from C:/Tools/nwrfcsdk/include/sapnwrfc.h:7:0,
                 from .\gorfc.go:62:
C:/Tools/nwrfcsdk/include/sapucrfc.h:705:5: warning: 'align' attribute directive ignored [-Wattributes]
     typedef __declspec(align(16)) SAP_SRAW platform_max_t[16];
     ^
In file included from .\gorfc.go:62:0:
C:/Tools/nwrfcsdk/include/sapnwrfc.h:29:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable : 4267)  // disable warning: conversion from 'size_t' to 'const unsigned int'
 ^
In file included from C:/Tools/nwrfcsdk/include/sapnwrfc.h:7:0,
                 from .\gorfc.go:62:
C:/Tools/nwrfcsdk/include/sapucrfc.h:1427:27: warning: 'unicodeId' defined but not used [-Wunused-variable]
 static SAP_RAW SAP_UNUSED unicodeId[] = cR("@(#)     Unicode");
                           ^

I appreciate your help.

@paparipote
Copy link

Hello Papibe, when I build my programs containing gorfc package, I get the warnings you indicate but the .exe program is built and I can execute it without problemas. Or may be, your .exe is generated but when you execute it, you do not get results? If that is the case, which version of Go are you using? I personally have problems with go 1.15 and I reported this yet.
Regards.

@zen37
Copy link

zen37 commented Oct 24, 2020

yes, same errors as indicated in #24

@bsrdjan
Copy link
Contributor

bsrdjan commented Oct 26, 2020

The Windows is not supported until #21 fixed.

@bsrdjan
Copy link
Contributor

bsrdjan commented May 4, 2021

Closing due to the sunset of the project.

@bsrdjan bsrdjan closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants