1

I am trying to use MQTT Poho C/C++ Client on Windows using Eclipse CDT and MinGW.
On Windows 10 I have installed Eclipse Neon and MinGW latest version with POSIX Thread Support.

Issue with MQTT Paho C++:

  • I have download the MQTT Paho Client C++ Source and also dependent C Library + headers
  • I have created a Eclipse CDT MinGW project and trying to build the sample application using C++ Paho
  • I am not able to build the code as I am getting compilation error for "std::mutex" 'mutex' is not a member of 'std', I tried to resolve it by googling but with no luck
  • As per one of the solutions I have also uninstalled MinGW which I have previously installed with pthread Win32 support and installed it again with pthread POSIX support.
  • I am also not able to find Paho C++ Pre-built libraries

Issue with MQTT Paho C Pre-built libraries:

  • I have download the Paho Pre-built C Library + headers for Windows
  • The zip file has .lib .dll .h and some samples
  • Again I have created a test project in Eclipse and included headers and libraries
  • Also configured the library path
  • It compiles correctly but linker hits the error and not able to find functions defined in .dll/.lib files
  • I checked rechecked everything but not sure about the issue
  • Do I need to use the DLL files provided with the library? I have not used them. I have tried to copy them in the Path and also in the same location as .lib but of no use
  • Also did google on how to use .dll with Eclipse CDT MinGW but no luck. :(

Let me know if anyone has tried to use Eclipse Paho C/C++ Source/Library With Windows Eclipse CDT MinGW.
Any possible solution to these issues will help.

User7723337
  • 11,857
  • 27
  • 101
  • 182

0 Answers0