In general, you have to use an ANSI C compatible C-compiler and set the include and library search path to the installed RFC SDK include and lib directory.
The compiler currently supported by SAP is Microsoft Visual Studio 2005.
On some platforms you also have to link the TCP/IP socket libraries explicitly.
Assume.../rfcsdk is the root directory of the unpacked RFC SDK. You must use the following compile/link syntax for the program sapinfo.c on different platforms.
HP-UX:
cc -Ae -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a
AIX (RS/6000):
ccc -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a
SINIX (RM600):
/opt/C/bin/cc -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a -lsocket -lnsl -lusc
You should use the above compiler because the librfc.a is also compiled with it.
DEC Alpha AXP:
cc -std1 -unsigne -DA_OSF -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a
SUN (SunPro):
/opt/SUNWspro/bin/cc -Xc -xcg92 -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a -lsocket -lnsl
You ought to use the above compiler because the librfc.a is also compiled with it.
WINDOWS with a 16-bit C-compiler:
cl /nologo /Gs /G2 /W4 /AL /D "_DOS" /Od /D "_DEBUG" /Mq /Fesapinfo.exe sapinfo.c librfc16.lib /link
WINDOWS with a 32-bit C-compiler:
cl -nologo -Od -G5 -Z7 -Gs -W3 -J -D_X86_ -DWIN32 /MT /FR -Fesapinfo.exe sapinfo.c librfc32.lib
OS/2 2.1 and higher:
icc -Gm+ -Ss+ -Ti -J- -DOS2 B"/E /NOI /ST:0x8000" sapinfo.c librfc.lib (sample for IBM VisualAge C++ V3)