🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4962

Re: indy 9.00.15 Winsock.h vs. Winsock2.h TROUBLE

#4962
From: Remy Lebeau (TeamB)
Date: Mon, 22 Nov 2004 18:05
37 lines
2426 bytes
"Frank" <frank.hofmann@stahlwerk-thueringen.de> wrote in message
news:41a1d512$1@newsgroups.borland.com...

> There's an include error between winsock.h of bcb
> and winsock2.h which comes with the indy package...

winsock2.h does not ship with Indy.  It ships with BCB, as does winsock.h.
They are both Microsoft headers, not Borland headers, and Microsoft did not
make the two headers compatible with each other.  Most Internet components,
particular those that ship with BCB by default, still use WinSock v1.x and
thus winsock.h.  Indy, on the other hand, uses WinSock 2.x and thus
winsock2.h instead.  The two do not co-exist in the same project very well.
Blame Microsoft, not Borland or Indy.  Are you trying to use other
Internet-related components in your project in addition to Indy?  If so,
why?

> I tried to define _WINSOCK_ in the cpp of my projectfile to
> prevent the include of winsock.h but it seems that the compiler
> includes the file before that #define statement...

The best place to make such a define is in the Prohect Options instead.
However, making such a define effects winsock2.h as well, so I do not advise
you to go that route in the first place.

> Please help....

Please go to http://www.deja.com and search through the newsgroup archives.
This issue has been discussed many many times before.

> With newer Versions of Indy the Installtion fails on my
> system. (install okay, can't use components)

Please provide more details.


Gambit
Technical Details
Message-ID: <41a22a04$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41a1d512$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f39eb52eec8e73c6
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <41a1d512$1@newsgroups.borland.com>
Subject: Re: indy 9.00.15 Winsock.h vs. Winsock2.h TROUBLE 
Date: Mon, 22 Nov 2004 10:05:51 -0800
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41a22a04$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101146628 68.69.17.41 (22 Nov 2004 10:03:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail