🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indy and WinSock2.h problem

#4455
From: Remy Lebeau (TeamB)
Date: Wed, 09 Feb 2005 00:24
42 lines
2828 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:ncfi01dumn3cn7h27dsm4je1vbkfh7ako1@4ax.com...

> Sorry, in my world, different modules produce different OBJs

Yes, but that doesn't matter in this case.  #define statements are processed
by the precompiler before the compiler then processes the actual source
code.  Once a #define has been declared, it is global for the entire
project, and as such affects all units that are compiled for the project.

> So a module that includes <Indy> and uses Indy functions
> should compile, and a module that contains <winsock> and
> calls naked sock functions should compile.

Not if the Indy unit makes winsock2.h be included by the precompiler before
winsock.h can be included.  Otherwise, winsock2.h prevents winsock.h from
working properly, regardless of which modules it is used in.

> The linker should be able to combine them.

The problem occurs before the linking stage.

> But I wonder how it would decide which Sock.DLL to bind each obj to.

That depends on which .lib files are included into the project.  The
compiler just tells the linker which functions are used.  The linker then
has to decide where those functions are located.

> 'Course, it'd be easier for the OP to just use the winsock2
> functions.

The OP does not have a choice in that matter.  winsock.h is being included
by the VCL.  The OP is mixing Borland's components with Indy's components.

> Or the Indy functions as you mentioned.

That would mean ripping out possible winsock.h-based code and libraries from
the project and just use Indy exclusively.


Gambit
Technical Details
Message-ID: <4209577f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4208eb0f@newsgroups.borland.com> <4208f629$1@newsgroups.borland.com> <t51i01puq1d6d5v5h92h300b7d3eni27tm@4ax.com> <42090d9d@newsgroups.borland.com> <ncfi01dumn3cn7h27dsm4je1vbkfh7ako1@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,107c7f042cb7cb6a
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: <4208eb0f@newsgroups.borland.com> <4208f629$1@newsgroups.borland.com> <t51i01puq1d6d5v5h92h300b7d3eni27tm@4ax.com> <42090d9d@newsgroups.borland.com> <ncfi01dumn3cn7h27dsm4je1vbkfh7ako1@4ax.com>
Subject: Re: Indy and WinSock2.h problem
Date: Tue, 8 Feb 2005 16:24:41 -0800
Lines: 44
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: <4209577f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107908479 68.69.17.41 (8 Feb 2005 16:21:19 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail