hgoldfish / qtnetworkng

QtNetwork Next Generation. A coroutine based network framework for Qt/C++, with more simpler API than boost::asio.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I failed to compile under win10.

liuxiandeng opened this issue · comments

I failed to compile under win10.

The error is “The error is "eventloop_win.obj:-1: error: LNK2019: Unresolved external symbol __imp_TranslateMessage, which is in the function "public: virtual void __cdecl qtng::WinEventLoopCoroutinePrivate::run(void)" (?run@WinEventLoopCoroutinePrivate@qtng @@UEAAXXZ) is quoted in ”.

My QT version is 5.13.1, and the MSVC version is 2017 64bit. The minimal project inherits Qmainwindow, and then integrates Qtnetworkng.I did not implement my own function or code. It can compile successfully under Linux, but it fails under Win10.

It seems that the linker miss user32.lib while using qmake with msvc.

I've fixed that problem.

Attention: qtng does not support ssl and https by default if you are using qmake.

Thank you hgoldfish,I solved this problem.

I added a line of code to qtnetworkng.pri: LIBS += -luser32, the position is on the next line of LIBS += -lws2_32

Thank you