[x264-devel] extern cli_input required when compiling shared library.
Wim Rijnders
wrijnders at gmail.com
Sun Nov 6 15:10:54 CET 2016
Hello all,
I'm assuming this is the place to post issues for the x264 library code.
I'm making a shared library which uses libx264.so. I encountered the
following two issues:
1. build succeeds, but the end application gives the following error:
OSError: /home/wim/projects/cogisen/qt_workspaces/libs/libx264.so.148:
undefined symbol: cli_input
On tracing the issues, I see that the following is defined in input/input.h:
extern cli_input_t cli_input;
The only place this variable is defined, is in main() of x264.c, which
rightly is outside of
the shared library.
The question is: Can this extern declaration be removed from the shared
library build?
I have no need for the cli target and in fact specified '--disable-cli' on
the configure command line. This does not affect the above error in any way.
2. In order to circumvent previous, I added this to my code:
#include "input/input.h"
cli_input_t cli_input;
Which led to the following error during compile:
.../common/rectangle.h: In function ‘void x264_macroblock_cache_rect(void*,
int, int, int, uint32_t)’:
.../common/rectangle.h:30:18: error: invalid conversion from ‘void*’ to
‘uint8_t* {aka unsigned char*}’ [-fpermissive]
uint8_t *d = dst;
^
src/./subdir.mk:23: recipe for target 'src/./main.o' failed
I requet you to change the following:
common/rectangle.h, line 30,
from:
uint8_t *d = dst;
to:
uint8_t *d = (uint8_t *) dst;
I understand that this is due to the very strict checks I enabled on my
project. However, I'd rather see this line changed (for the benefit of all)
than lower the checking level to compensate for this.
Thanks,
Wim Rijnders
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20161106/b42b83ee/attachment.html>
More information about the x264-devel
mailing list