简体   繁体   中英

Delphi 2007 and Indy10 compile error in IdStackWindows

I've just updated my Indy10 installation to the latest revision (5276) and I now get an error when trying to compile a Windows application.

IdStackWindows.pas(2364) Error: E2029 '..' expected but ';' found

The issue seems to be the declaration of ka: tcp_keepalive on line 2364 in TIdStackWindows.SetKeepAliveValues .

I'm using Delphi 2007 on Windows 7 Professional x64.

After further investigation I found that there is a new TCP_KEEPALIVE constant being declared in IdWinsock2.pas:

  {$EXTERNALSYM TCP_KEEPALIVE}
  TCP_KEEPALIVE         = 3;

This conflicts with the existing tcp_keepalive record, so that has been renamed to _tcp_keepalive . Updating the ka variable declared in TIdStackWindows.SetKeepAliveValues() to this new typename resolves the error.

I then found another compile issue in IdSSLOpenSSL.pas:

[DCC Error] IdSSLOpenSSL.pas(980): E2065 Unsatisfied forward or external declaration: 'IndySSL_CTX_use_certificate_chain_file'

This error can be resolved by adding a missing implementation of IndySSL_CTX_use_certificate_chain_file() inside the {$ELSE} section of an {$IFDEF STRING_IS_UNICODE} block that starts at line 1155, and have it simply call OpenSSL's standard SSL_CTX_use_certificate_chain_file() function.

UPDATE:
All the necessary fixes (described above) are available in revision 5277 and later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM