Hacker News new | ask | show | jobs
by JoeAcchino 4528 days ago
How do I compile this? GCC complains:

    CFLAGS="-g -pipe" make -k donut
    cc -g -pipe    donut.c   -o donut
    donut.c:1:2: warning: data definition has no type or storage class [enabled by default]
    donut.c: In function ‘main’:
    donut.c:4:16: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
    donut.c:5:12: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default]
    donut.c:9:63: error: ‘s’ undeclared (first use in this function)
    donut.c:9:63: note: each undeclared identifier is reported only once for each function it appears in
    donut.c:10:18: error: expected ‘,’ or ‘;’ before ‘in’
    donut.c:11:32: error: ‘t’ undeclared (first use in this function)
    make: *** [donut] Errore 1
    
    Compilation exited abnormally with code 2 at Thu Jan 23 16:11:12
2 comments

I had no problems using: gcc -o donut donut.c -lm

You may also have errors in your version of donut.c, try copying the version from http://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html

Merge lines 9 and 10, so that

s\

in(...

becomes

sin(...