Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Undefined reference to mosquitto_subscribe@@VERS_0.9

Hi Alessio,

The problem you are seeing is related to the linker stage of
compiling. If you're compiling against libmosquitto only (rather than
libmosquittopp), then I can't see how this error could occur. If
you're compiling against libmosquittopp, then the most likely scenario
is that you have an old version of libmosquittopp installed and a new
version of libmosquitto. The new version of libmosquitto then doesn't
provide the VERS_0.9 functions, they would be MOSQ_1.4 or similar.

To fix this, you should search for any old versions of libmosquitto* -
look inside /usr/local/lib and /usr/lib and remove them, then
reinstall libmosquitto. Make sure you use an up to date source, some
Debian and Ubuntu releases only have mosquitto 0.15 for example.

Cheers,

Roger



On Mon, Jun 29, 2015 at 2:16 PM, alessio troiano <alessio@xxxxxxxx> wrote:
> Hi all,
> I'm trying to compile my c++ mqtt client using libmosquitto, but the
> compiler say me this error:
>
> Undefined reference to mosquitto_subscribe@@VERS_0.9
>
> If I comment the function, the problem is on another function, for example:
>
> Undefined reference to mosquitto_new@@VERS_0.9
>
> What's the meaning of the message and how I can solve this problem?
>
> Thank you in advance
> AlTro
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top