Skip to content

Conversation

@dchokola
Copy link

@dchokola dchokola commented Dec 6, 2018

Fails to build with: gcc (Debian 8.2.0-10) 8.2.0

gcc pkg-config --cflags xmms2-client glib-2.0 -Wall -c -o tut1.o tut1.c
tut1.c: In function ‘main’:
tut1.c:69:3: warning: implicit declaration of function ‘fprintf’ [-Wimplicit-function-declaration]
fprintf (stderr, "OOM!\n");
^~~~~~~
tut1.c:69:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
tut1.c:69:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
tut1.c:21:1:
+#include <stdio.h>

tut1.c:69:3:
fprintf (stderr, "OOM!\n");
^~~~~~~
tut1.c:69:12: error: ‘stderr’ undeclared (first use in this function)
fprintf (stderr, "OOM!\n");
^~~~~~
tut1.c:69:12: note: ‘stderr’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
tut1.c:69:12: note: each undeclared identifier is reported only once for each function it appears in
tut1.c:86:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
fprintf (stderr, "Connection failed: %s\n",
^~~~~~~
tut1.c:86:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
tut1.c:121:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
fprintf (stderr, "playback start returned error, %s",
^~~~~~~
tut1.c:121:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
make: *** [Makefile:7: tut1.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant