Solved how to add library(qmqtt.h) in qmqtt client for windows
-
im running it in qtcreator, not outside.inside qt also do i need to include?
-
@shravani In QtCreator it should work. Use http://www.dependencywalker.com to see what is missing.
Besides the lib file - do you have the DLL? Lib file is needed for linking, but DLL is needed at runtime.
Also can you show how you added the lib to pro file? -
-
@shravani
Again: you need the DLL file to be able to execute your app. Where is qmqtt.dll (or libqmqtt.dll)? -
-
@shravani The DLL must be in a directory where the operating system is looking for shared libraries when loading an app. Fastest way is to copy it to the build directory of your app (where your executable is).
-
This post is deleted! -
@jsulm
i added all dlls but now getting this error
-
Hi,
You can't start an application like that from explorer, you first have to follow the same steps you would before deploying your application on another computer.
-
@SGaist
In Qt creator also I'm getting same error after adding ucrtbased.dll to debug folder.
i tried executing examples given in qt but getting same error.
recently i installed this qt 5.8.1 msvc2015 new version because in qt 5.0 it(mqtt) is not working. -
@shravani Which DLLs exactly did you copy and from where? No need to copy ucrtbased.dll when starting from QtCreator.
-
@jsulm
but while running it showed ucrtbased.dll is missing)DLL not found as above post) -
@shravani While running from QtCreator?
-
@jsulm
while running from qt creator(DLL not found)
so i checked from outside qt to see which dll missing.so i added that -
@shravani Running outside from QtCreator is different. You actually only need to copy your qmqtt.dll if you want to run from QtCreator. If you want to run outside of QtCreator you need to deploy your app as @SGaist already said. In one of my previous posts in this thread I posted a link to a side where you can read how to deploy your app on Windows.
-
@jsulm
i copied qmqtt.dll but still got that error (DLL not found).do i need to add anything else? -
@shravani After adding qmqtt.dll which DLL is missing?
-
@jsulm
it was just showing the above error.i cannot find which dll is missing -
@shravani When you built qmqtt.dll were any other DLLs created in the same directory? Did you try to find out what is missing using http://www.dependencywalker.com ?
-
@jsulm
only 2 dll files(qmqtt.dll,qmqttd.dll) created and i copied both.