2014-01-20 2 views
4

an example stack trace displaying code을 컴파일하려고합니다. 내가 가진 test.c 파일을 컴파일 할 때 : STDERR_FILENO 우분투에 선언되지 않았습니다

./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.) 

내 포함

원래의 우편 번호와 동일합니다 :

#include <stdio.h> 
#include <execinfo.h> 
#include <signal.h> 
#include <stdlib.h> 

내 기계는 우분투입니다

gcc -g -rdynamic ./test.c -o test 

을 나는 다음과 같은 오류가 13.04. 라이브러리가 누락되었거나 무언가를 포함하지 않았습니까?

+0

당신이'test.c'에 포함하고있는 것을 보여주십시오. – trojanfoe

+0

@ 트로이 호프 업데이트 됨 – ducin

답변