public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling problem in Dynix/ptx v4.4.8
@ 2003-04-08 19:26 Singh, Harpreet  - G Consultant
  2003-04-08 19:32 ` Janis Johnson
  2003-04-08 19:32 ` Mike Stump
  0 siblings, 2 replies; 3+ messages in thread
From: Singh, Harpreet  - G Consultant @ 2003-04-08 19:26 UTC (permalink / raw)
  To: gcc

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

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

* Re: Compiling problem in Dynix/ptx v4.4.8
  2003-04-08 19:26 Compiling problem in Dynix/ptx v4.4.8 Singh, Harpreet  - G Consultant
@ 2003-04-08 19:32 ` Janis Johnson
  2003-04-08 19:32 ` Mike Stump
  1 sibling, 0 replies; 3+ messages in thread
From: Janis Johnson @ 2003-04-08 19:32 UTC (permalink / raw)
  To: Singh, Harpreet  - G Consultant; +Cc: gcc

On Tue, Apr 08, 2003 at 07:32:54PM +0100, 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.

This mailing list is for discussions about the development of the GNU
Compiler Collection.  Your question about use of socket libraries on
a particular operating system is outside the scope of this list.

Before trying a more appropriate forum for your question, however, make
sure that you are linking your program with "-lsocket -lnsl".

Janis

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

* Re: Compiling problem in Dynix/ptx v4.4.8
  2003-04-08 19:26 Compiling problem in Dynix/ptx v4.4.8 Singh, Harpreet  - G Consultant
  2003-04-08 19:32 ` Janis Johnson
@ 2003-04-08 19:32 ` Mike Stump
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Stump @ 2003-04-08 19:32 UTC (permalink / raw)
  To: Singh, Harpreet  - G Consultant; +Cc: gcc

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

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

end of thread, other threads:[~2003-04-08 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-08 19:26 Compiling problem in Dynix/ptx v4.4.8 Singh, Harpreet  - G Consultant
2003-04-08 19:32 ` Janis Johnson
2003-04-08 19:32 ` Mike Stump

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