-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile C Plugin on macOS #13163
Comments
cplugins are not supported on macOS as far as i know. also if you have problems building the plugin this is the wrong issue tracker to ask about. |
well, mpv on macOS does report it has cplugins feature enabled:
BTW: I'm the plugin author, trying to make it support macOS |
It sould be possible to make it work with EDIT: Tested this simple program on macOS, it works (on plugin with single compile uint).
#include <stdio.h>
#include <mpv/client.h>
MPV_EXPORT
int mpv_open_cplugin(mpv_handle *handle)
{
printf("mpv version: %lu\n", mpv_client_api_version());
return 0;
} so I get an ugly solution to make my plugin compile: cat all the source files to one and compile it. |
I don't know much about macOS dynamic loading, it could work same as on Linux, but apparently it doesn't.
Indeed, For convenience and transparent use, we just define symbols in header and let We can make it more robust for macOS, but I'm not sure what is the best solution, as I don't use this platform. The first question is it really expected that symbols are not loaded to global lookup, same as on Linux? maybe
Idea was to make it transparent, so you don't even have to worry about it. If more targets needs this workaround, it might be better to introduce new API for function pointer query. But likely we can fix it somehow without it. |
I'm trying to build mpv-debug-plugin for macOS, but it failed to compile without a linking target (works on Linux).
Also tried
MPV_CPLUGIN_DYNAMIC_SYM
, but got:It seems
selectany
only work on Windows. ping @kasper93The text was updated successfully, but these errors were encountered: