Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using qmqtt under windows #17

Closed
tipih opened this issue Feb 3, 2015 · 27 comments
Closed

Using qmqtt under windows #17

tipih opened this issue Feb 3, 2015 · 27 comments

Comments

@tipih
Copy link

tipih commented Feb 3, 2015

Hi I have a hard time using the qmqtt under windows, work fine on MAC and linux, but on windows I get strange linker errors.

I can compile it into a lib, but then when using it I get linker errors.
If I just try to use it in a normale way, I also get errors.

A small number of the errors from the qml-qmqtt project
Makefile.Debug:125: recipe for target 'debug\mqtt.exe' failed
mingw32-make[1]: Leaving directory 'C:/Users/$hschack/Documents/qml-qmqtt'
makefile:34: recipe for target 'debug' failed
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:211: undefined reference to _imp___ZN5QMQTT6Client12handlePubackEht' ./debug\moc_qmqtt_client.o: In functionZNK5QMQTT6Client10metaObjectEv':
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:311: undefined reference to _imp___ZN5QMQTT6Client16staticMetaObjectE' ./debug\moc_qmqtt_client.o: In functionZN5QMQTT6Client11qt_metacallEN11QMetaObject4CallEiPPv':
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:340: undefined reference to _imp___ZNK5QMQTT6Client4portEv' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:341: undefined reference to_imp___ZNK5QMQTT6Client4hostEv'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:342: undefined reference to _imp___ZNK5QMQTT6Client8clientIdEv' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:343: undefined reference to_imp___ZNK5QMQTT6Client8usernameEv'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:344: undefined reference to _imp___ZNK5QMQTT6Client8passwordEv' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:345: undefined reference to_imp___ZN5QMQTT6Client9keepaliveEv'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:346: undefined reference to _imp___ZNK5QMQTT6Client13autoReconnectEv' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:353: undefined reference to_imp___ZN5QMQTT6Client7setPortEj'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:354: undefined reference to _imp___ZN5QMQTT6Client7setHostERK7QString' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:355: undefined reference to_imp___ZN5QMQTT6Client11setClientIdERK7QString'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:356: undefined reference to _imp___ZN5QMQTT6Client11setUsernameERK7QString' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:357: undefined reference to_imp___ZN5QMQTT6Client11setPasswordERK7QString'
C:\Users$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:358: undefined reference to _imp___ZN5QMQTT6Client12setKeepAliveEi' C:\Users\$hschack\Documents\qml-qmqtt/debug/moc_qmqtt_client.cpp:359: undefined reference to_imp___ZN5QMQTT6Client16setAutoReconnectEb'

@emqplus
Copy link
Contributor

emqplus commented Feb 4, 2015

yes, qmtt has the issue on windows, I have no idea still...

@tipih
Copy link
Author

tipih commented Feb 4, 2015

I think it is releated to the global.h file, and the export import
definitions for libraries, not sure how that could be removed, but I Think
that could be the answer, so insted of using it as a library, just use it
as plain code

Den onsdag den 4. februar 2015 skrev Ery Lee notifications@github.com:

yes, qmtt has the issue on windows, I have no idea still...


Reply to this email directly or view it on GitHub
#17 (comment).

MVH.

.

@mactro
Copy link

mactro commented Apr 4, 2015

Adding #define QMQTT_LIBRARY in global.h fixed a problem for me on Win7 x64.

@Spitor
Copy link

Spitor commented Aug 26, 2015

Hi, i need this library with Windows but I had the same issue. So, still no solutions ?

@emqplus
Copy link
Contributor

emqplus commented Aug 27, 2015

@Spitor, please discuss the issue with @mactro and @tipih.

@toni1991
Copy link

Sorry for being impatient, but I heavily rely on running qmqtt on Windows. So is there any improvement?

@tipih
Copy link
Author

tipih commented Oct 20, 2015

I can Send you à git link

Den tirsdag den 20. oktober 2015 skrev Antonio Grieco <
notifications@github.com>:

Sorry for being impatient, but I heavily rely on running qmqtt on Windows.
So is there any improvement?


Reply to this email directly or view it on GitHub
#17 (comment).

MVH.

.

@toni1991
Copy link

Is there a particular reason to close the issue @wuming123057 ? For me it's still not linkable under Windows :/

@emqplus
Copy link
Contributor

emqplus commented Nov 11, 2015

@toni1991, please discuss the issue with @wuming123057. He said this issue had been fixed:)

@wuming123057 wuming123057 reopened this Nov 12, 2015
@wuming123057
Copy link
Contributor

@toni1991 Is the following issue?
release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0x982): undefined reference to _imp___ZN5QMQTT7MessageC1Ev' release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0x990): undefined reference to_imp___ZN5QMQTT7Message8setTopicERK7QString'
release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0x9b1): undefined reference to _imp___ZN5QMQTT7Message10setPayloadERK10QByteArray' release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0x9e5): undefined reference to_imp___ZN5QMQTT7Message6setQosEh'
release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0x9ff): undefined reference to _imp___ZN5QMQTT7MessageD1Ev' release/qmlqmqtt.o:qmlqmqtt.cpp:(.text+0xa34): undefined reference to_imp___ZN5QMQTT7MessageD1Ev'

@toni1991
Copy link

@wuming123057 Sorry was my fault. It's working great! Thank you very much!

@wuming123057
Copy link
Contributor

@wguynes
At new qmqtt library QMQTT::message class redesign with Q_D point.
You work great!
And I test it at my windows environment without errors.
This issues can close?

@wguynes
Copy link
Contributor

wguynes commented Jan 16, 2016

If I have fixed all existing problems with the Windows platform then, yes, this issue should be closed.

@wguynes wguynes closed this as completed Jan 24, 2016
@Pavlines
Copy link

Please give me a library for windows

@mwallnoefer
Copy link
Collaborator

We do not provide any binary distributions. The build works also on Windows, just add the NO_UNIT_TESTS to the qmake CONFIG flags (e.g. CONFIG += NO_UNIT_TESTS). If you encounter other errors, please report them here!

@Pavlines
Copy link

Pavlines commented May 1, 2017

I still can not compile this. Not under Windows, nor under Linux. Always produces an error when compiling. In particular, the absence of the qmqtt.h file . How can I get a library file or a header file, to just connect it to my project.
I work in Qt, under Windows

@mwallnoefer
Copy link
Collaborator

@Pavlines Hard to say. Do you have a chance to attach us a full build log? I am always building it in Qt Creator and there it works like a charm.

@emqtt/qmqtt-team Has anyone an idea what this could be (absence of qmqtt.h)?

@Pavlines
Copy link

Pavlines commented May 7, 2017

Programm C:\Users\Pavlines\Desktop\build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release\examples\mqtt\client\release\qmqtt_example.exe absent.

@Pavlines
Copy link

Pavlines commented May 7, 2017

image

@Pavlines
Copy link

Pavlines commented May 7, 2017

13:10:03: Выполняются этапы для проекта qmqtt...
13:10:03: Настройки не изменились, этап qmake пропускается.
13:10:03: Запускается: «C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe»
cd src\ && ( if not exist Makefile C:\Qt\5.9\mingw53_32\bin\qmake.exe -o Makefile C:\Users\Pavlines\Desktop\qmqtt-master\src\src.pro -spec win32-g++ ) && C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src'
cd mqtt\ && ( if not exist Makefile C:\Qt\5.9\mingw53_32\bin\qmake.exe -o Makefile C:\Users\Pavlines\Desktop\qmqtt-master\src\mqtt\mqtt.pro -spec win32-g++ ) && C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile
mingw32-make[2]: Entering directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Release all
mingw32-make[3]: Entering directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
mingw32-make[3]: Nothing to be done for 'all'.
mingw32-make[3]: Leaving directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug all
mingw32-make[3]: Entering directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
mingw32-make[3]: Nothing to be done for 'all'.
mingw32-make[3]: Leaving directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
mingw32-make[2]: Leaving directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/mqtt'
mingw32-make[1]: Leaving directory 'C:/Users/Pavlines/Desktop/build-qmqtt-Desktop_Qt_5_9_0_MinGW_32bit-Release/src'
13:10:06: Процесс «C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe» завершился успешно.
13:10:06: Прошло времени: 00:02.

@mwallnoefer
Copy link
Collaborator

mwallnoefer commented May 7, 2017

Aha, this is Qt 5.9 with MinGW 32 on Windows. For sure you have already tried to clean up and rebuild from scratch? But in your log I do not see the error message about the missing qmqtt.h?

Personally I use Qt 5.6 where the build works without issues.
@emqtt/qmqtt-team Has anyone tested Qt 5.9?

@Pavlines
Copy link

Pavlines commented May 7, 2017

The project is compiled. But nothing is created except the lib-file. Also does not create qmqtt.h in relise folder. I'm trying to compile a emqtt/qmqtt-client project. But I do not know how to force it to compile a emqtt/emqtt project into a library with an "qmqtt.h" file. To connect it to the emqtt/qmqtt-client project.

@mwallnoefer
Copy link
Collaborator

I have seen only now that this is a known issue #89 (I didn't remember), so please let us follow-up it there. As a workaround you could try building it with Qt 5.6 or 5.7 where it works.

@pavanic002
Copy link

mqtterr

Hi,
I'm facing issue with Makefile while building qmqtt in windows. I'm using Qt 5.6.0 (MSVC 2013, 32 bit).
Please refer console output below.

15:39:08: Running steps for project qmqtt...
15:39:08: Starting: "C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe" clean
cd src\ && ( if not exist Makefile C:\Qt(32)\Qt5.6.0\5.6\msvc2013\bin\qmake.exe "C:\Users\pavani_Chadalapaka\Downloads\qmqtt-master (2)\qmqtt-master\src\src.pro" -spec win32-msvc2013 "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ) && C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe -f Makefile clean
\Qt5.6.0\5.6\msvc2013\bin\qmake.exe was unexpected at this time.
jom: C:\Users\pavani_Chadalapaka\Downloads\qmqtt-master (2)\build-qmqtt-Desktop_Qt_5_6_0_MSVC2013_32bit-Debug\Makefile [sub-src-clean] Error 1
15:39:08: The process "C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
15:39:08: Configuration unchanged, skipping qmake step.
15:39:08: Starting: "C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe"
cd src\ && ( if not exist Makefile C:\Qt(32)\Qt5.6.0\5.6\msvc2013\bin\qmake.exe "C:\Users\pavani_Chadalapaka\Downloads\qmqtt-master (2)\qmqtt-master\src\src.pro" -spec win32-msvc2013 "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ) && C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe -f Makefile
\Qt5.6.0\5.6\msvc2013\bin\qmake.exe was unexpected at this time.
jom: C:\Users\pavani_Chadalapaka\Downloads\qmqtt-master (2)\build-qmqtt-Desktop_Qt_5_6_0_MSVC2013_32bit-Debug\Makefile [sub-src-make_first] Error 1
15:39:09: The process "C:\Qt(32)\Qt5.6.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project qmqtt (kit: Desktop Qt 5.6.0 MSVC2013 32bit)
When executing step "Make"
15:39:09: Elapsed time: 00:01.

@mwallnoefer
Copy link
Collaborator

mwallnoefer commented Aug 3, 2017

That's odd. With Qt 5.6 with MSVC2013 32 bit I get this if I am doing a qmake:

14:54:08: Running steps for project qmqtt...
14:54:08: Starting: "C:\Qt\5.6\msvc2013\bin\qmake.exe" C:\Users\MatthiasW\Git\qmqtt\qmqtt.pro -spec win32-msvc2013
14:54:08: The process "C:\Qt\5.6\msvc2013\bin\qmake.exe" exited normally.
14:54:08: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" qmake_all

jom 1.1.2 - empower your cores

cd src\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\src\src.pro -spec win32-msvc2013 -o Makefile
cd src\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd mqtt\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\src\mqtt\mqtt.pro -spec win32-msvc2013 -o Makefile

= c:/Users/MatthiasW/Git/qmqtt
= c:/Users/MatthiasW/Git/build-qmqtt-Desktop_Qt_5_6_2_MSVC2013_32bit-Release
Project MESSAGE: perl -w C:\Qt\5.6\msvc2013\bin\syncqt.pl -module qmqtt -version 1.0.0 -outdir C:/Users/MatthiasW/Git/build-qmqtt-Desktop_Qt_5_6_2_MSVC2013_32bit-Release C:/Users/MatthiasW/Git/qmqtt
cd mqtt\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd examples\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\examples\examples.pro -spec win32-msvc2013 -o Makefile
cd tests\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\tests\tests.pro -spec win32-msvc2013 -o Makefile
cd examples\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd mqtt\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\examples\mqtt\mqtt.pro -spec win32-msvc2013 -o Makefile
cd mqtt\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd client\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\examples\mqtt\client\client.pro -spec win32-msvc2013 -o Makefile
cd tests\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd auto\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\tests\auto\auto.pro -spec win32-msvc2013 -o Makefile
cd auto\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd cmake\ && C:\Qt\5.6\msvc2013\bin\qmake.exe C:\Users\MatthiasW\Git\qmqtt\tests\auto\cmake\cmake.pro -spec win32-msvc2013 -o Makefile
cd cmake\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
cd client\ && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile qmake_all
14:54:10: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited normally.
14:54:10: Elapsed time: 00:02.

@nizqsut
Copy link

nizqsut commented Sep 13, 2018

Still have issue on Windows 10 64bit / Based on Qt 5.11.1.
":-1: error: [sub-mqtt-qmqtt-pro-qmake_all] Error 3."

@nizqsut
Copy link

nizqsut commented Sep 13, 2018

Fixed it. It need to install perl for windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests