public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compilation
@ 2001-02-23 11:28 Salari, Morris M
  2001-02-23 12:34 ` compilation Jerry Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Salari, Morris M @ 2001-02-23 11:28 UTC (permalink / raw)
  To: 'help-gcc@gnu.org'

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Hi Jerry,
I put "lsocket" in command line with gcc, it does not compile and creating
the message that I put them in a file.
The syntax I used:
gcc -lsocket http_get.c -o http
It does not create the object file http, I attched the message file.
Please rescue and let me know that I should use differnet syntax for
compilation.
Thanks again.
Morris Salari <<gcerror.1>> 

[-- Attachment #2: gcerror.1 --]
[-- Type: text/plain, Size: 277 bytes --]

Undefined                       first referenced
 symbol                             in file
gethostbyname                       /var/tmp/ccUgKVV_1.o  (symbol belongs to imp
licit dependency /usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to http

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compilation
  2001-02-23 11:28 compilation Salari, Morris M
@ 2001-02-23 12:34 ` Jerry Miller
  2001-02-23 14:22   ` compilation [afterthought/clarification] Jerry Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Jerry Miller @ 2001-02-23 12:34 UTC (permalink / raw)
  To: Salari, Morris M, help-gcc

Hi Morris,

Somehow, I never before encountered the need for "-lnsl",
but libnsl.a contains the missing "gethostbyname".  I think
it will work after this.

Jerry

----- Original Message -----
From: Salari, Morris M <MMSc@pge.com>
To: <help-gcc@gnu.org>
Sent: Friday, February 23, 2001 2:04 PM
Subject: compilation


> Hi Jerry,
> I put "lsocket" in command line with gcc, it does not compile and creating
> the message that I put them in a file.
> The syntax I used:
> gcc -lsocket http_get.c -o http
> It does not create the object file http, I attched the message file.
> Please rescue and let me know that I should use differnet syntax for
> compilation.
> Thanks again.
> Morris Salari <<gcerror.1>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compilation [afterthought/clarification]
  2001-02-23 12:34 ` compilation Jerry Miller
@ 2001-02-23 14:22   ` Jerry Miller
  0 siblings, 0 replies; 3+ messages in thread
From: Jerry Miller @ 2001-02-23 14:22 UTC (permalink / raw)
  To: help-gcc

Hi again, Morris,

Just to be sure I haven't been too vague - which, it occurred to
me on rereading this, might have been the case - the correct
and complete command to build this module is as follows:

gcc http_get.c -o http -lsocket -lnsl

I'll be offline most of this weekend.  You shouldn't have a
problem with compilation errors from this point on, but if
you still have any other unsolved problems by Monday,
I'll try to help out if I can.

Jerry

----- Original Message -----
From: Jerry Miller <gmiller@cs.sunysb.edu>
To: Salari, Morris M <MMSc@pge.com>; <help-gcc@gnu.org>
Sent: Friday, February 23, 2001 3:21 PM
Subject: Re: compilation


> Hi Morris,
>
> Somehow, I never before encountered the need for "-lnsl",
> but libnsl.a contains the missing "gethostbyname".  I think
> it will work after this.
>
> Jerry
>
> ----- Original Message -----
> From: Salari, Morris M <MMSc@pge.com>
> To: <help-gcc@gnu.org>
> Sent: Friday, February 23, 2001 2:04 PM
> Subject: compilation
>
>
> > Hi Jerry,
> > I put "lsocket" in command line with gcc, it does not compile and
creating
> > the message that I put them in a file.
> > The syntax I used:
> > gcc -lsocket http_get.c -o http
> > It does not create the object file http, I attched the message file.
> > Please rescue and let me know that I should use differnet syntax for
> > compilation.
> > Thanks again.
> > Morris Salari <<gcerror.1>>
> >
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-02-23 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-23 11:28 compilation Salari, Morris M
2001-02-23 12:34 ` compilation Jerry Miller
2001-02-23 14:22   ` compilation [afterthought/clarification] Jerry Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).