Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Sep 2000 09:16:36 +0200
From:      "Vik Nuckchady" <vik@mailbox.co.za>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Problem compiling socket program
Message-ID:  <200009090717.JAA00679@relay.mailbox.co.za>

next in thread | raw e-mail | index | archive | help
Hello,
       I am trying to compile a very simple program but it fails every
time with the following errors:

/* MAKE INSTRUCTIONS */
cc client.c -o client.o
cc -Lnsl -Lsocket client.o -o client
/* ERRORS STARTS HERE */
client.o: In function `_init':
client.o(.init+0x0): multiple definition of `_init'
/usr/lib/crti.o(.init+0x0): first defined here
client.o(.data+0x0): multiple definition of `__progname'
/usr/lib/crt1.o(.data+0x0): first defined here
client.o: In function `_start':
client.o(.text+0x0): multiple definition of `_start'
/usr/lib/crt1.o(.text+0x0): first defined here
client.o: In function `_fini':
client.o(.fini+0x0): multiple definition of `_fini'
/usr/lib/crti.o(.fini+0x0): first defined here
/usr/lib/libc.so(.dynamic+0x0): multiple definition of `_DYNAMIC'
/usr/lib/libc.so(.got.plt+0x0): multiple definition of
`_GLOBAL_OFFSET_TABLE_'
*** Error code 1

Stop.
/* ERRORS END HERE */

The program contains the following :

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>

void main()
{
   int sock_d = socket(PF_INET,SOCK_STREAM,0);
}

Thanks in advance for any support.

Cheers
Vik
_______________________________________________________________
 http://www.webmail.co.za the South-African free email service


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009090717.JAA00679>