I am trying to compile but the following error is being returned, can you help me please
$ make
#cc -g -Wall `pkg-config --cflags libavformat libavcodec libavutil` `pkg-config --libs libavformat libavcodec libavutil` -pthread -o server segment.o buffer.o publisher.o server2.c
cc -g -Wall `pkg-config --cflags libavformat libavcodec libavutil` -pthread -o server segment.o buffer.o publisher.o server2.c `pkg-config --libs libavformat libavcodec libavutil`
server2.c: In function ‘write_segment’:
server2.c:225:9: warning: implicit declaration of function ‘avio_context_free’ [-Wimplicit-function-declaration]
avio_context_free(&avio_ctx);
^~~~~~~~~~~~~~~~~
server2.c: In function ‘accept_thread’:
server2.c:301:66: warning: passing argument 4 of ‘av_opt_get’ from incompatible pointer type [-Wincompatible-pointer-types]
av_opt_get(client, "method", AV_OPT_SEARCH_CHILDREN, &method);
^
In file included from server2.c:8:0:
/usr/include/x86_64-linux-gnu/libavutil/opt.h:736:5: note: expected ‘uint8_t ** {aka unsigned char **}’ but argument is of type ‘char **’
int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val);
^~~~~~~~~~
server2.c:302:68: warning: passing argument 4 of ‘av_opt_get’ from incompatible pointer type [-Wincompatible-pointer-types]
av_opt_get(client, "resource", AV_OPT_SEARCH_CHILDREN, &resource);
^
In file included from server2.c:8:0:
/usr/include/x86_64-linux-gnu/libavutil/opt.h:736:5: note: expected ‘uint8_t ** {aka unsigned char **}’ but argument is of type ‘char **’
int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val);
^~~~~~~~~~
/tmp/cccoshgL.o: In function `write_segment':
/home/marcio/dados/mkvserver_mk2/server2.c:225: undefined reference to `avio_context_free'
collect2: error: ld returned 1 exit status
Makefile:11: recipe for target 'server' failed
make: *** [server] Error 1
Good afternoon
Hello Brother
I am trying to compile but the following error is being returned, can you help me please