IceCold
IceCold

Reputation: 21212

How to fix 'undeclared identifier' error in Indy?

I have downloaded Indy 10.4587 and I get 'undeclared identifier' error when I try to compile it and install it in Delphi 7.

type
  ADDRINFO = record
    ai_flags        : Integer;      // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
    ai_family       : Integer;      // PF_xxx
    ai_socktype     : Integer;      // SOCK_xxx
    ai_protocol     : Integer;      // 0 or IPPROTO_xxx for IPv4 and IPv6
    ai_addrlen      : size_t;     <---------------------------------------------HERE
    ...
  end;

The error is in this file: LIB\SYSTEM\IdWship6.pas(49) Fatal: Could not compile used unit 'IdWinsock2.pas'

How can I fix this bug? Does anybody have the direct download link to a stable version?


It looks like the latest pseudo-stable version of Indy you can download may be 10.4587, which actually may be 10.4.587. There is no ReadMe or About file inside the archive to explain the version and release date. It can be downloaded from a 3rd party web site here: http://indy.fulgan.com

However, people are talking about a possible version 10.5.8. Please let me know if you have a real download link for this 'magic' version.

Edit:

I just downloaded v10.4587 and it doesn't compile.

Upvotes: 0

Views: 2819

Answers (2)

horatio
horatio

Reputation: 1436

A quick google on "delphi 7 size_t" offers up a link wherein there is a workaround to define size_t as well as a note that an earlier revision of the indy lib than what you mention is the last one which can be built using delphi 7

see: https://forums.embarcadero.com/thread.jspa?threadID=48622

Upvotes: 4

cmaynard
cmaynard

Reputation: 2860

size_t is an undefined type. put

size_t = integer;

at the top

Upvotes: -1

Related Questions