public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* socket: Undefined
@ 1999-09-20 10:57 Shicheng
  1999-09-20 11:04 ` Peter A. Friend
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Shicheng @ 1999-09-20 10:57 UTC (permalink / raw)
  To: help-gcc

I work on SunOS 5.6 platform from a networked NT machine via telnet; and
I would like to obtain some advice on using the gcc compiler. Under my
working dir, there are five files: connectsock.c,
connecttcp.c, connectudp.c, errexit.c and tcpdaytime.c; after issuing
the commend:

gcc *.c

however, I got the following errors:

"[60]% gcc *.c
Undefined                      first referenced
symbol                            in file
socket                              /var/tmp/cc0heQO31.o
getprotobyname                      /var/tmp/cc0heQO31.o
gethostbyname                      /var/tmp/cc0heQO31.o
getservbyname                      /var/tmp/cc0heQO31.o
inet_addr                          /var/tmp/cc0heQO31.o
connect                            /var/tmp/cc0heQO31.o
ld: fatal: Symbol referencing errors. No output written to a.out"

In the file connectsock.c, I do include the follwing paths:

#include "/usr/include/sys/types.h"
#include "/usr/include/sys/socket.h"

#include "/usr/include/netinet/in.h"
#include "/usr/include/netdb.h"

I even checked all the required files are there under the include dir! I
had the same errors when using "cc" as well!

BTW, when trying another simple program which just makes use
of the #include <stdio.h>, there is no problem/errors at all!

Thanks for sending me some advice on how to solve this problem.

Shicheng


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

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

end of thread, other threads:[~1999-10-01  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-20 10:57 socket: Undefined Shicheng
1999-09-20 11:04 ` Peter A. Friend
1999-09-30 23:56   ` Peter A. Friend
1999-10-01  0:00   ` Peter A. Friend
1999-09-20 11:05 ` Stephen Frost
1999-09-30 23:56   ` Stephen Frost
1999-10-01  0:00   ` Stephen Frost
1999-09-30 23:56 ` Shicheng
1999-10-01  0:00 ` Shicheng

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).