
Untitled
By: a guest on
Jun 2nd, 2012 | syntax:
None | size: 1.25 KB | hits: 13 | expires: Never
cbeck@lol:~/afp/lib/libav$ make
CGOPKGPATH=afp cgo -- -g libav.go
Error running gcc:
$ gcc -m32 -Wall -Werror -o_cgo_.o -gdwarf-2 -fno-eliminate-unused-debug-types -c -xc - -g <<EOF
typedef struct { char *p; int n; } _GoString_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
char *CString(_GoString_);
#include <stdlib.h>
#include "libav.h"
#include "libav.c"
typeof(CString) *__cgo__0;
typeof(prepare_decoding) *__cgo__1;
typeof(decode_packet) *__cgo__2;
typeof(init_decoding) *__cgo__3;
typeof(free) *__cgo__4;
typeof(get_stream_info) *__cgo__5;
typeof(AVDecodeContext) *__cgo__6;
typeof(int) *__cgo__7;
EOF
cc1: warnings being treated as errors
In file included from <stdin>:8:
libav.c: In function 'prepare_decoding':
libav.c:95: error: implicit declaration of function 'av_guess_format'
libav.c:95: error: initialization makes pointer from integer without a cast
libav.c:96: error: 'AVMEDIA_TYPE_AUDIO' undeclared (first use in this function)
libav.c:96: error: (Each undeclared identifier is reported only once
libav.c:96: error: for each function it appears in.)
libav.c: In function 'decode_packet':
libav.c:203: error: implicit declaration of function 'avcodec_decode_audio3'
make: *** [_cgo_defun.c] Error 2