21912

Project ERROR: Unknown module(s) in QT: websockets

<h3>Question</h3>

I'm trying to run a simple client example using QTWebsockets using Qt Creator, already add the

QT += websockets

But it throws this when i run build or qmake

:-1: error: Unknown module(s) in QT: websockets

I tried

QT += core websockets

Then realized that since installed Qt Creator from the repositories it wasn't up to date, so I reinstalled it from the Qt website but the problem persisted, I then ran pkg-config --modversion QtCore and it returns 4.8.6, thing is, in the QT version tab of qt creator it shows 5.4.1 to GCC compiler which is the compiler I’m using, in /opt/Qt/5.4/gcc_64/lib there is the QT5WebSockets module even in the help tab are listed the QT5 modules but I can't use them.

Tried with SerialPort and it didn't work, tried with Opengl and it worked which means is a version problem but I can't seem to find how to solve.


<h3>Answer1:</h3>
sudo apt-get install libqt5websockets5-dev
<h3>Answer2:</h3>

I solved it, the problem was that I just opened the project I made with qt4, when I tried to build it in the freshly installed qt creator the .pro.user file kept pointing to all qt4.

Solution, create a new project and add the source from the first, or change all the references from qt4 to qt5.


<h3>Answer3:</h3>
sudo zypper install libqt5-qtwebsockets-devel

来源:https://stackoverflow.com/questions/29933425/project-error-unknown-modules-in-qt-websockets

Recommend

  • Is there a way to “install” nuget package like the way Visual Studio does, but on a deployment serve
  • UWP getting HTTP 301 in windows mobile
  • 微信公众号发送告警Python脚本
  • MySQL Error: 1395 Can not delete from join view
  • android room migration indices change
  • Using symfony2 routing component (outside of symfony2)
  • React Access parent component name
  • Use Chrome to visit github, can not load css and js. but IE is OK
  • Quantum Program The name 'BellTest' does not exist in the current context
  • Bilingual spoken flash cards for Google Assistant
  • Can an implemented class have methods NOT declared in its parent interface?
  • making an array of bigInteger of size biginteger in java
  • How to add a-z filter to wordpress search result?
  • Firebase Database OutofMemory Error
  • Perform SIP Call from Windows Phone 8.1
  • How to add an Auth Token in every request using AFIncrementalStore?
  • Is there a .NET method equivalent to NETWORKDAYS in Excel?
  • Google TV VideoView playing YouTube rtsp videos
  • Create .java file and compile it to a .class file at runtime
  • How to process remote XML files with XSLT
  • Unable to run testNG tests from maven
  • Find all parks for a given zipcode with google maps
  • How to control xtics in gnuplot
  • 2d barcode reader Java ME sdk
  • Splitting ReportLab table across PDF page (side by side)?
  • Facebook Error (#200) The user hasn't authorized the application to perform this action (PHP)
  • How to load dynamic images in custom ListView
  • Set WebClient.Builder.exchangeStrategies() without losing Spring Jackson configuration
  • What is the difference between dynamically creating a script tag and statically embed a script tag?
  • Problems using phonegap / cordova file plugin part 2 - synchronicity
  • Ruby regex for matching simpliest Ruby's regexes
  • LinkedIn API: Access Denied when getting Access Token
  • C++ STL stack pop operation giving segmentation fault
  • How to include associated objects using gon in Rails/jQuery
  • Support of :after in IE7
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • Running R's aov() mixed effects model from Python using rpy2
  • How to mutate multiple variables without repeating codes?