1

我正在尝试在 Visual Studio 2010 项目中编译 companyClient.c,但即使我正确链接到 lib sapnwrfc.lib,我仍然会得到几个未解决的外部:

Error   1   error LNK2019: unresolved external symbol _RfcCloseConnection@8 referenced in function _errorHandling   C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   2   error LNK2019: unresolved external symbol _RfcSAPUCToUTF8@24 referenced in function _nlsui_main C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   3   error LNK2019: unresolved external symbol _RfcDestroyFunction@8 referenced in function _nlsui_main  C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   4   error LNK2019: unresolved external symbol _RfcGetString@24 referenced in function _nlsui_main   C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   5   error LNK2019: unresolved external symbol _RfcGetStructure@16 referenced in function _nlsui_main    C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   6   error LNK2019: unresolved external symbol _RfcInvoke@12 referenced in function _nlsui_main  C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   7   error LNK2019: unresolved external symbol _RfcSetChars@20 referenced in function _nlsui_main    C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   8   error LNK2019: unresolved external symbol _RfcCreateFunction@8 referenced in function _nlsui_main   C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   9   error LNK2019: unresolved external symbol _RfcGetFunctionDesc@12 referenced in function _nlsui_main C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   10  error LNK2019: unresolved external symbol _RfcOpenConnection@12 referenced in function _nlsui_main  C:\Users\Attila\Desktop\SAP_NWR_RFC\SAP_NWR_RFC\companyClient.obj   SAP_NWR_RFC
Error   11  error LNK1120: 10 unresolved externals      C:\Users\Attila\Desktop\SAP_NWR_RFC\Debug\SAP_NWR_RFC.exe   SAP_NWR_RFC

如果我在这里遗漏了什么,你能告诉我吗?我遵循了 pdf 文档中的指南,并且还阅读了:(http://help.sap.com/saphelp_nwpi71/helpdata/en/22/0430ba488911d189490000e829fbbd/frameset.htm)/NetWeaver RFC SDK/Programming with the NW RFC API/使用 NW RFC SDK 文件

我会很感激任何帮助。

4

1 回答 1

3

我遇到过同样的问题。确保您正在编译到操作系统,而不是芯片。如果操作系统是 32 位,请使用此处找到的 32 位编译/链接选项,如果芯片和操作系统是 64 位,请按照 64 位条目的说明进行操作:

https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1056696

于 2013-04-10T16:33:04.740 回答