Skip to content

Error on compiling #23

@naazguu

Description

@naazguu

Good afternoon

Hello Brother

I am trying to compile but the following error is being returned, can you help me please

Captura de tela de 2019-07-18 16-22-59

$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions