Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » How to use mosquitto with MS Visual Studio(I want to create a MQTT client with the mosquitto lib in Microsoft Visual Studio Community 2022 as a C++ console app)
How to use mosquitto with MS Visual Studio [message #1852679] Tue, 31 May 2022 09:19
Andre Kuhn is currently offline Andre KuhnFriend
Messages: 1
Registered: May 2022
Junior Member
I am not able to create a MQTT client because of a linker error.

The problem is not in the mosquitto lib. Probably the problem are the visual studio settings or a worng file path of my mosquitto installation.

Hopefully a lot of you use visual studio and can advice.

I installed mosquitto with this installer mosquitto-2.0.14-install-windows-x64.exe.

The file structure and the visual studio settings you can see on the pic attached.

The erroe i get is

LNK2019 unresolved external symbol "_imp_mosquitto_lib_init"

This source code cause this problem.

#include <iostream>
#include <mosquittopp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// #include <unistd.h>

int main()
{
 
	int rc;
	struct mosquitto_message* msg;

	mosquitto_lib_init();


index.php/fa/42129/0/
Previous Topic:Error: Problem setting TLS options: File not found
Next Topic:Mosquitto broker "starting in local only mode"
Goto Forum:
  


Current Time: Thu May 02 20:12:29 GMT 2024

Powered by FUDForum. Page generated in 0.02939 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top