All pastes #2045398 Raw Edit

Untitled

public c v1 · immutable
#2045398 ·published 2011-04-12 09:44 UTC
rendered paste body
$ cat a.h extern int f(){                     return 5;}                $ cat 1.c #include "a.h"int main(){                 void g();        g();             return 0;}                $ cat 2.c#include "a.h"#include <stdio.h>void g(){        printf("%d\n", f());}$ gcc 1.c 2.c/tmp/ccrAqQEC.o: In function `f':2.c:(.text+0x0): multiple definition of `f'/tmp/ccQGjSBs.o:1.c:(.text+0x0): first defined herecollect2: ld returned 1 exit status