I am trying to compile a stack trace example that displays code . When I compile the file test.cwith
gcc -g -rdynamic ./test.c -o test
I get the following error:
./test.c: In function ‘handler’:
./test.c:16: error: ‘STDERR_FILENO’ undeclared (first use in this function)
./test.c:16: error: (Each undeclared identifier is reported only once
./test.c:16: error: for each function it appears in.)
My inclusions are the same as in the source mail code:
#include <stdio.h>
#include <execinfo.h>
#include <signal.h>
#include <stdlib.h>
My car is ubuntu 13.04. Did I skip some library or add nothing?
ducin source
share