.h 파일에서 상태 변수를 선언하려고하는데 컴파일러에서 변수가 존재하지 않는다고했습니다. 브리징 헤더 파일에 아무 것도 추가해야합니까? 내 빠른 파일에서신속한 C 변수에 액세스
나는 dstate
컴파일러는 라인 g722_coder_init(&dstate)
의 "해결되지 않은 식별자 'dstate'의 사용"라고 또는 cstate에 액세스 할 수 없습니다.
헤더 파일
#ifdef __cplusplus
extern "C" {
#endif
extern struct g722_dstate dstate;
extern struct g722_cstate cstate;
int g722_coder_init ( struct g722_cstate *s );
int g722_encode(short *data, unsigned char *outdata,int len, struct g722_cstate *s );
int g722_decoder_init ( struct g722_dstate *s);
int g722_decode(unsigned char *decdata, short *pcmout, int len, struct g722_dstate *s);
#ifdef __cplusplus
}
#endif
브리지 헤더
#import "g722_codec.h"