не компилится vanish2

Discussion in 'Песочница' started by catorrat, 9 May 2010.

  1. catorrat

    catorrat New Member

    Joined:
    23 Aug 2009
    Messages:
    6
    Likes Received:
    0
    Reputations:
    0
    gcc vanish2.c -o vanish2
    vanish2.c: In function 'fixer':
    vanish2.c:110: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:166: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:169: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:178: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:181: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:184: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:187: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c: In function 'main':
    vanish2.c:215: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:215: error: too few arguments to function 'exit'
    vanish2.c:222: warning: incompatible implicit declaration of built-in function 'strcpy'
    vanish2.c:228: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:228: error: too few arguments to function 'exit'
    vanish2.c:233: warning: incompatible implicit declaration of built-in function 'strlen'
    vanish2.c:234: warning: incompatible implicit declaration of built-in function 'memset'
    vanish2.c:251: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:251: error: too few arguments to function 'exit'
    vanish2.c:257: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:257: error: too few arguments to function 'exit'
    vanish2.c:261: warning: incompatible implicit declaration of built-in function 'strlen'
    vanish2.c:282: warning: incompatible implicit declaration of built-in function 'exit'
    vanish2.c:282: error: too few arguments to function 'exit'
    vanish2.c:289: warning: incompatible implicit declaration of built-in function 'strncpy'
    vanish2.c:321: warning: incompatible implicit declaration of built-in function 'strstr'

    как полечить не скажете?

    система:
    Linux 2.6.22.9-91.0.120asp #1 SMP Tue Oct 2 00:17:42 EEST 2007 i686 i686 i386 GNU/Linux
     
  2. overxor

    overxor Member

    Joined:
    11 Sep 2009
    Messages:
    32
    Likes Received:
    9
    Reputations:
    0
    конечно способ не самый элегантный, но попробуй на строках 215,228,251,257,282 в качестве параметра функции exit передать 0. например
     
  3. catorrat

    catorrat New Member

    Joined:
    23 Aug 2009
    Messages:
    6
    Likes Received:
    0
    Reputations:
    0
    это первое, что я пробовал, покопавшись в гугле. Эффект нулевой.
     
  4. Pashkela

    Pashkela Динозавр

    Joined:
    10 Jan 2008
    Messages:
    2,750
    Likes Received:
    1,044
    Reputations:
    339
    ми вот этот юзаю:

    https://forum.antichat.net/thread36595-WhiteCat+logcleaner.html

    никогда никаких проблем