x265.h is valid C++ but not a valid C code now
Issue #377
resolved
Hello. After the commit 563cbe1 I can't use x265 in C projects:
x265.h:1753:40: error: expected ';', ',' or ')' before '&' token
FILE* x265_csvlog_open(const x265_param& param);
^
x265.h:1757:40: error: expected ';', ',' or ')' before '&' token
void x265_csvlog_frame(const x265_param& param, const x265_picture& pic);
^
x265.h:1762:64: error: expected ';', ',' or ')' before '&' token
void x265_csvlog_encode(x265_encoder *encoder, const x265_stats& stats, int argc, char** argv);
^
x265.h:1766:36: error: expected ';', ',' or ')' before '&' token
void x265_dither_image(x265_picture& pic, int picWidth, int picHeight, int16_t *errorBuf, int bitDepth);
^
x265.h:1815:50: error: expected ';', ',' or ')' before '&' token
FILE* (*csvlog_open)(const x265_param&);
^
x265.h:1816:51: error: expected ';', ',' or ')' before '&' token
void (*csvlog_frame)(const x265_param&, const x265_picture&);
^
x265.h:1817:67: error: expected ';', ',' or ')' before '&' token
void (*csvlog_encode)(x265_encoder*, const x265_stats&, int, char**);
^
x265.h:1818:47: error: expected ';', ',' or ')' before '&' token
void (*dither_image)(x265_picture&, int, int, int16_t*, int);
Comments (6)
-
-
reporter Still can't get FFmpeg to compile with x265, but that's probably something unrelated to the current issue:
libx265.a(api.cpp.obj):api.cpp:(.text+0x2c53): undefined reference to `x265_10bit::x265_api_get_143(int)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2c53): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `x265_10bit::x265_api_get_143(int)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2c63): undefined reference to `x265_12bit::x265_api_get_143(int)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2c63): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `x265_12bit::x265_api_get_143(int)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2cc3): undefined reference to `x265_12bit::x265_api_query(int, int, int*)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2cc3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `x265_12bit::x265_api_query(int, int, int*)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2cd3): undefined reference to `x265_10bit::x265_api_query(int, int, int*)' libx265.a(api.cpp.obj):api.cpp:(.text+0x2cd3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `x265_10bit::x265_api_query(int, int, int*)'
-
Did you recompile x265 after applying the patch? For FFmpeg it is needed new header file and new lib file (this patch doesn't change binary code but change some function name mangling which is important for linker).
-
reporter Yes, I did. I've fixed my compilation issues and can confirm that patch above works just fine. Thanks a lot!
-
Account Deactivated Thanks for reporting this issue, and for the fix! I am running some tests on the patch that @Ma0 sent to the mailing list before pushing it into the repo. Will close this issue after that.
-
Account Deactivated - changed status to resolved
Resolved with changeset 533c167774e8
- Log in to comment
Thanks for your report. Could you check patch https://patches.videolan.org/patch/18630/