我试图通过在 OpenVMS 中使用带有 SSL 的 TCP/IP 套接字来开发简单的客户端/服务器编程。我们正在代码中访问 Proc API。因此,我使用 lnproc 选项将我的程序与 SSL 库链接起来。当我在链接时使用以下选项时,它会引发以下错误。它的 64 位编译器,所以我使用了下面的选项 1。使用下面的命令和选项编译,
cc/noopt/POINTER_SIZE=64/PREFIX=ALL stand=vaxc /nolist/object=<PROJ_PATH>client.obj /nodebug/include=(<PROJ_PATH>,SSL$INCLUDE,tcpware_include:)/nested_include_directory=primary_file <PROJ_PATH>client.c
lnproc <PROJ_PATH>client.EXE <PROJ_PATH>client.obj
%LINK-W-NUDFSYMS, 6 undefined symbols:
%LINK-I-UDFSYM, BERR_EXIT
%LINK-I-UDFSYM, ERR_EXIT
%LINK-I-UDFSYM, SSL_GET_PEER_CERTIFICATE
%LINK-I-UDFSYM, SSL_GET_VERIFY_RESULT
%LINK-I-UDFSYM, X509_GET_SUBJECT_NAME
%LINK-I-UDFSYM, X509_NAME_GET_TEXT_BY_NID
%LINK-W-USEUNDEF, undefined symbol ERR_EXIT referenced
in psect $LINK$ offset %X00000030
in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol BERR_EXIT referenced
in psect $LINK$ offset %X00000040
in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol SSL_GET_PEER_CERTIFICATE referenced
in psect $LINK$ offset %X000000C0
in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol SSL_GET_VERIFY_RESULT referenced
in psect $LINK$ offset %X000000D0
选项2:
cc/noopt/POINTER_SIZE=64/PREFIX=ALL PREFIX=ALL/stand=vaxc /nolist/object=<PROJ_PATH>client.obj /nodebug/include=(<PROJ_PATH>,SSL$INCLUDE,tcpware_include:)/nested_include_directory=primary_file <PROJ_PATH>client.c
我怀疑LIBSSL32.OLB,LIBCRYPTO32.OLB
在链接时是否需要使用库lnproc
。因此,我已要求我的系统管理员为此安装库,但他们说为此使用可共享对象。与可共享对象链接
lnproc/MAP <PROJ_PATH>client.EXE <PROJ_PATH>client.obj ,LINKER_OPT/OPTIONS
它抛出以下错误
%DCL-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement
请注意,在这些命令中,LINKER_OPT.OPT 是一个简单的文本文件,其中包含以下几行:
SYS$SHARE:SSL$LIBSSL_SHR/SHARE
SYS$SHARE:SSL$LIBCRYPTO_SHR/SHARE
我在这里想念什么。