cmake cannot find libws2_32
Solved
General and Desktop
-
I am using Qt 5.15.10 MinGW-32 in windows 10 and the mingw compiler that installs with Qt:
Path to compiler isC:\Pgms\QtOL\Tools\mingw810_32\bin
I converted this project form .pro to cmake. The .pro relevant line is:
win32:LIBS += libws2_32
And that has been working fine for several years.
I've been using the python routine so do the initial conversion from qmake to cmake:qmake2cmake ./BIPSFileMgr.pro --min-qt-version 5.15
The corresponding lines in the CMakeLists.txt file are:
if(WIN32) target_link_libraries(BIPSFileMgr PRIVATE libws2_32 ) endif()
But after running cmake I get
cannot find -llibws2_32
I have tried adding explicit path to the libws2_32.a (not .lib as I would expect...)
target_link_libraries(BIPSFileMgr PRIVATE C:/Pgms/QtOL/Tools/mingw810_32/i686-w64-mingw32/lib/libws2_32.a # ws2_32 )
But that gives the same error.
Can someone point me in a better direction here? -