Skip to content
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

Undefined symbols _mosquitto_callback_register, _mosquitto_callback_unregister #3025

Open
shyamsingla11 opened this issue Mar 27, 2024 · 0 comments

Comments

@shyamsingla11
Copy link

I am trying to build a custom v5 auth plugin, so i have started by looking at the code of message-timestamp plugin (available in plugins directory). But on building the plugin i am getting the following errors:
Undefined symbols for architecture x86_64: "_mosquitto_callback_register", referenced from: _mosquitto_plugin_init in mosquitto_auth_acl_plugin-512511.o "_mosquitto_callback_unregister", referenced from: _mosquitto_plugin_cleanup in mosquitto_auth_acl_plugin-512511.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am trying this with the mosquitto v2.0.18
Build command i am using gcc -shared -fPIC -o mosquitto_auth_acl_plugin.so mosquitto_auth_acl_plugin.c -L/usr/local/Cellar/mosquitto/2.0.18/lib -lmosquitto
I did a little investigation and found that i am able to use the functions declared in mosquitto.h file but not able to use functions declared in mosquitto_broker.h (like mosquitto_callback_register , mosquitto_callback_unregister )
I have checked there is a similar issue reported here -> #2514 (i haven't checked this in develop branch yet as i wanted to use my plugin in production with the current version of mosquitto)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant