← Back to team overview

mosquitto-users team mailing list archive

compiling auth plugin

 

Hi guys,

This might not be the right place to ask but can't seem to find anyone else
to help.

I'm trying to compile auth plugin to use with Redis. Took C Redis client (
https://github.com/redis/hiredis), mosquitto_plugin.h, and implemented all
the required functions.

I'm compiling it with the following command:
gcc -c -fPIC example.c hiredis.c -o plugin.o
gcc -shared -o plugin.so plugin.o

However when I try to use it with Mosquitto (or a sample program which is
using dlopen to open .so) it gives me an error about undefined symbols and
lists all redis functions.

I'm sure it's just some compiler flags which I'm missing. Compiling Redis
example code works fine.

Thanks!

Artjom

Follow ups