Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
how to add library(qmqtt.h) in qmqtt client for windows
-
@raven-worx
hi,
after building i came to know qmqtt.lib was created(5th line from last).but i could not find it inorder to add that path to .pro file.can u please tell by default where it will be stored? in build/debug also it is not present(see above post).thank you
-
Most easiest way is to hit windows search button, search that file and find that directory. Specify this directory in pro file.
-
@shravani
according to this log in the \bin directory.
-
@raven-worx
thank you very much. now i added that .lib file to .pro file and build all is successful.but as the program start executing im getting this error while debugging.can u please look into it?
i dont understand which dll file is missing and where to add it?
-
@shravani How do you start the app? From QtCreator?
On Windows you can use http://www.dependencywalker.com/ to find out which libraries an application needs.
If you want to start your app outside of QtCreator then you first need to deploy it: http://doc.qt.io/qt-5/windows-deployment.html
-
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?
-
@jsulm
in this src/ qmqtt.h,.. and .lib files are there.so added that path.INCLUDEPATH += C:\Qt\qmqtt-master\src
LIBS += -LC:\Qt\qmqtt-master\src -lqmqtt
-
@shravani
Again: you need the DLL file to be able to execute your app. Where is qmqtt.dll (or libqmqtt.dll)?
-
@jsulm
it is inside src only.do i need to add anywhere else again?
after building library it created in /bin so i copied from there to src folder
-
@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.
-
@shravani Then you should deploy your app using Qt Windows Deployment Tool and see which DLL will end up in your deployment directory.
-
@jsulm
i changed build to release and its working now.
-
@jsulm
i am able to connect to emq broker.
but it is not connecting to other brokers like shiftr.io,IBM cloud through internet ?
-
@shravani Should be possible if you have Internet connection and access rights.
-
@jsulm
internet connection is there. access rights?
do i need to change anything in qt program?
-
@shravani I never used it but I guess you need access rights to connect? You should ask the people providing those brokers.
-
@jsulm
do you know any broker that can be connected to qt application through internet?
-
@shravani I guess any mqtt broker?
-
-
Hi @shravani
can you make tutorial step by step how to add library (qmqtt.h). can you help me
thank you
-