← Back to team overview

mosquitto-users team mailing list archive

Re: compiling auth plugin

 

> 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.

It seems to me you haven't linked against Redis; add -lhiredis go the
second command, and make sure (ldconfig) Mosquitto can find the plugin.

        -JP


Follow ups

References