Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conflict With winsock
#2
(08-24-2018, 05:52 PM)tultalk Wrote: Have program BCB5 Indy 9?

Are you asking a question or stating a fact? Which version of Indy are you *actually* using - 9 or 10? If you don't know, ask Indy itself. At design-time, you can right-click on any Indy component in the Form designer and see Indy's version number. Or, you can read the Version property of any Indy component in your code at runtime.

(08-24-2018, 05:52 PM)tultalk Wrote: Using Indy component IdFTP the files are truncated at 1440 or 2880??

Indy does not truncate files during upload. Something else is going on.

(08-24-2018, 05:52 PM)tultalk Wrote: I deleted Indy component and added ICS and immediate got errors

You deleted the Indy component from your Form, but you likely didn't remove the corresponding #include statements for Indy's header files from your code. The IDE will not remove them for you.

(08-24-2018, 05:52 PM)tultalk Wrote: [C++ Error] winsock.h(56): E2015 Ambiguity between 'u_int' and 'Idwinsock2::u_int'

I don't see how that is possible, as there should be no definition of u_int inside of IdWinsock2.hpp at all. In IdWinsock2.pas, u_int is declared with the {$EXTERNALSYM} directive, so the Delphi compiler would not create a declaration for u_int when generating IdWinsock2.hpp.

In any case, IIRC, ICS uses winsock.h, but Indy uses winsock2.h, which is not compatible with winsock.h. See this earlier reply for how to deal with that.

(08-24-2018, 05:52 PM)tultalk Wrote: [C++ Error] winsock.h(64): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)'
[C++ Error] winsock.h(64): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)'

Likewise, fd_set() is also declared with {$EXTERNALSYM} and so it should not exist in IdWinsock2.hpp. And even if it weren't, Indy declares it as FD_SET() instead of as fd_set(). Delphi would have output it as FD_SET(), and C++ is case-sensitive.

(08-24-2018, 05:52 PM)tultalk Wrote: [C++ Error] winsock.h(171): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long'
[C++ Error] winsock.h(272): E2015 Ambiguity between 'u_char' and 'Idwinsock2::u_char'
[C++ Error] winsock.h(273): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short'

Same as u_int above.

(08-24-2018, 05:52 PM)tultalk Wrote: I deleted the ICS component and the errors were still there.

Because you likely didn't remove the relevant #include statements from your code.

(08-24-2018, 05:52 PM)tultalk Wrote: I invoked a a conditional _WINSOCKAPI_

That is part of the solution, yes.

(08-24-2018, 05:52 PM)tultalk Wrote:  and changed WinSock.hpp:

Don't do that.

Reply


Messages In This Thread
Conflict With winsock - by tultalk - 08-24-2018, 05:52 PM
RE: Conflict With winsock - by rlebeau - 08-24-2018, 09:59 PM
RE: Conflict With winsock - by tultalk - 08-26-2018, 02:17 AM
RE: Conflict With winsock - by rlebeau - 08-27-2018, 08:15 PM
RE: Conflict With winsock - by tultalk - 08-26-2018, 03:14 PM
RE: Conflict With winsock - by tultalk - 08-26-2018, 06:55 PM
RE: Conflict With winsock - by tultalk - 08-27-2018, 11:39 AM
RE: Conflict With winsock - by tultalk - 08-27-2018, 01:34 PM
RE: Conflict With winsock - by tultalk - 08-28-2018, 02:24 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)