Compiling problem in Dynix/ptx v4.4.8
Mike Stump
mrs@apple.com
Tue Apr 8 19:32:00 GMT 2003
Wrong list. Please see a list devoted to Dynix for answers. Failing
that, try nm /lib/* /usr/lib/* to find possible definitions of the
symbols you are interested in.
On Tuesday, April 8, 2003, at 11:32 AM, Singh, Harpreet - G Consultant
wrote:
>> I am working on Dynix/ptx v4.4.8.
>> and had written a simple socket program and when I am trying to
>> complile
>> it with the following command it gives me the list following list of
>> errors.
>>
>> "cc socprog.c"
>>
>> the program is as follows:
>>
>> #include <sys/types.h>
>> #include <sys/socket.h>
>> #include <sys/time.h>
>> #include <stdio.h>
>> #include <netinet/in.h>
>> # define MAXLINE 4096
>>
>> int main(int argc, char **argv)
>> {
>> int sockfd,n;
>> char recvline[MAXLINE+1];
>> struct sockaddr_in servaddr;
>> if(argc != 2)
>> {
>> printf("usage: a.out <IPAddress>");
>> exit(0);
>> }
>> if((sockfd = socket(AF_INET,SOCK_STREAM,0)) < 0)
>> { printf("socket error");
>> exit(0);
>> }
>>
>> exit(0);
>> }
>>
>> The header files are in usr\include
>> and the files which are in usr\include\sys
>> are types,time, socket
>> so that is why I have given the sub folder and the library files are
>> in
>> usr\lib and it is in path.
>>
>>
>> The following list is displayed once
>> "cc socprog.c"
>> is executed.
>>
>> Undefined first referenced
>> symbol in file
>> __bsd_accept socprog.o
>> __bsd_bind socprog.o
>> __bsd_connect socprog.o
>> __bsd_getpeername socprog.o
>> __bsd_getsockname socprog.o
>> __bsd_getsockopt socprog.o
>> __bsd_listen socprog.o
>> __bsd_recvfrom socprog.o
>> __bsd_recvmsg socprog.o
>> __bsd_sendto socprog.o
>> __bsd_sendmsg socprog.o
>> __bsd_setsockopt socprog.o
>> __bsd_shutdown socprog.o
>> __bsd_socket socprog.o
>> __bsd_socketpair socprog.o
>> __bsd_bindresvport socprog.o
>> __bsd_rcmd socprog.o
>> __bsd_rresvport socprog.o
>>
>>
>>
>> Please if you can advice me ASAP on this as how to resolve this
>> problem I
>> would be very thankfull.
>>
>>
>>
> ***********************************************************************
> ************
> This email and any accompanying files are confidential. If you are
> not the intended recipient you must not use, copy or disclose the
> content. If you have received this email in error please contact the
> sender by return email and delete this message.
> Thankyou for your co-operation.
> ***********************************************************************
> **************
>
More information about the Gcc
mailing list