Find the answer to your Linux question:
Results 1 to 2 of 2
Hi i downloaded a simple client server program. when i try to compile that program using makefile i am getting following error. I dont know what it is. Can anyone ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    308

    Error in simple client server program


    Hi i downloaded a simple client server program. when i try to compile that program using makefile i am getting following error. I dont know what it is. Can anyone help me

    Code:
    sharief@sharief-desktop:~/Desktop/simple program$ make
    gcc -g -c echosrv.c
    echosrv.c: In function ‘main’:
    echosrv.c:47: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:58: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:66: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:73: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:84: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:92: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:100: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:111: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:119: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:145: warning: incompatible implicit declaration of built-in function ‘memcpy’
    echosrv.c:149: warning: incompatible implicit declaration of built-in function ‘exit’
    echosrv.c:166: warning: passing argument 2 of ‘accept’ from incompatible pointer type
    echosrv.c:172: warning: passing argument 2 of ‘accept’ from incompatible pointer type
    echosrv.c:186: warning: passing argument 2 of ‘accept’ from incompatible pointer type
    echosrv.c: In function ‘RequestType’:
    echosrv.c:415: warning: incompatible implicit declaration of built-in function ‘strcpy’
    echosrv.c: In function ‘BufferPortResponse’:
    echosrv.c:476: warning: incompatible implicit declaration of built-in function ‘strcpy’
    echosrv.c:564: warning: incompatible implicit declaration of built-in function ‘strlen’
    gcc -g -o echosrv echosrv.o
    gcc -g -c echoclnt.c
    echoclnt.c: In function ‘main’:
    echoclnt.c:34: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:41: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:48: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:55: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:62: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:73: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:80: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:91: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:98: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c: In function ‘SetServerOptions’:
    echoclnt.c:133: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:143: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:148: warning: incompatible implicit declaration of built-in function ‘memcpy’
    echoclnt.c:153: warning: passing argument 2 of ‘connect’ from incompatible pointer type
    echoclnt.c:155: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:159: warning: incompatible implicit declaration of built-in function ‘strcpy’
    echoclnt.c:161: warning: incompatible implicit declaration of built-in function ‘strlen’
    echoclnt.c:164: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:170: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:181: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:187: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:198: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:204: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:215: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:221: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c: In function ‘TalkToUDPServer’:
    echoclnt.c:247: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:257: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:262: warning: incompatible implicit declaration of built-in function ‘memcpy’
    echoclnt.c:266: warning: incompatible implicit declaration of built-in function ‘malloc’
    echoclnt.c:278: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:283: error: too many arguments to function ‘recv’
    echoclnt.c:286: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c: In function ‘TalkToTCPServer’:
    echoclnt.c:327: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:337: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:342: warning: incompatible implicit declaration of built-in function ‘memcpy’
    echoclnt.c:347: warning: passing argument 2 of ‘connect’ from incompatible pointer type
    echoclnt.c:349: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:353: warning: incompatible implicit declaration of built-in function ‘malloc’
    echoclnt.c:363: warning: incompatible implicit declaration of built-in function ‘exit’
    echoclnt.c:370: warning: incompatible implicit declaration of built-in function ‘exit’
    make: *** [echoclnt.o] Error 1
    sharief@sharief-desktop:~/Desktop/simple program$
    Thanks in advance...

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    echoclnt.c:283: error: too many arguments to function ‘recv’
    Error message tell you the reason,check recv() system call.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •