ffmpeg-shared fails to link to x265, any idea?

Questions that occur when trying to compile FFmpeg.
Post Reply
Burakin
Posts: 2
Joined: Sun Jun 25, 2017 4:47 am

ffmpeg-shared fails to link to x265, any idea?

Post by Burakin » Sun Jun 25, 2017 5:18 am

I've recently ran into an issue where I'm unable to compile ffmpeg shared with x265 multibit static.

ffmpeg-static compiles fine however the shared variant fails with those errors (and many more similiar ones):

https://pastebin.com/wPJziBNx


Did anyone ever come across this and knows a solution or a tip or something?

User avatar
Zeranoe
Site Admin
Posts: 702
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg-shared fails to link to x265, any idea?

Post by Zeranoe » Tue Jun 27, 2017 12:48 pm

I use:

Code: Select all

diff -uprN a/source/x265-extras.h b/source/x265-extras.h
--- a/source/x265-extras.h      2017-06-14 22:07:01.485283923 -0700
+++ b/source/x265-extras.h      2017-06-14 22:38:28.945923631 -0700
@@ -33,11 +33,7 @@
 extern "C" {
 #endif

-#if _WIN32
-#define LIBAPI __declspec(dllexport)
-#else
 #define LIBAPI
-#endif

 /* Open a CSV log file. On success it returns a file handle which must be passed
  * to x265_csvlog_frame() and/or x265_csvlog_encode(). The file handle must be

Burakin
Posts: 2
Joined: Sun Jun 25, 2017 4:47 am

Re: ffmpeg-shared fails to link to x265, any idea?

Post by Burakin » Tue Jun 27, 2017 2:35 pm

That did it, works with that patch. Strange that I need that all of the sudden, did you just recently began using this patch or since a while?

I think I tried to use the export C api switch in x265 .. (that one didn't work)

also, any idea whether this should be reported to the x265 people?
Last edited by Burakin on Tue Jun 27, 2017 3:38 pm, edited 1 time in total.

User avatar
Zeranoe
Site Admin
Posts: 702
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg-shared fails to link to x265, any idea?

Post by Zeranoe » Tue Jun 27, 2017 3:02 pm

Burakin wrote:
Tue Jun 27, 2017 2:35 pm
Strange that I need that all of the sudden, did you just recently began using this patch or since a while?
I just started using the HG version of x265, so I'm not sure when they implemented it.
Burakin wrote:
Tue Jun 27, 2017 2:35 pm
also, any idea whether this should this be reported to the x265 people?
It absolutely should be, I just haven't got around to it yet.

Here's how x264 does it:

Code: Select all

#ifdef X264_API_IMPORTS
#define X264_API __declspec(dllimport)
#else
#define X264_API
#endif

Post Reply
'