PDA

View Full Version : Qt websocket program not compiling



dannykj
31st December 2014, 10:07
I have been working with QT and Ubuntu(14.04) for the last 2 months. I am using QT Creator 3.0.1 which is based on Qt 5.2.1.Currently I am developing a websocket program. When I compile a sample program I get the following error
/usr/bin/ld: cannot find -lQt5WebSockets

I have installed the following libraries:
libqt5webkit5
libqt5webkit5-dev
libqt5webkit5:i386
Please guide me as to how to fix this problem. Thanks and regards

wysota
31st December 2014, 11:20
Do you have libQt5WebSockets.so in your library path?

anda_skoa
31st December 2014, 12:25
/usr/bin/ld: cannot find -lQt5WebSockets

I have installed the following libraries:
libqt5webkit5
libqt5webkit5-dev
libqt5webkit5:i386


If you look at the names you will see that there is a certain difference.
The library you look for ends in "sockets" the packages you have end in "kit".

Based on that we could derive that the package you are looking for is
libqt5websockets5-dev

A quick search using the package manager confirms that.

Cheers,
_

dannykj
1st January 2015, 12:13
Do you have libQt5WebSockets.so in your library path?

No I don't have the library file

dannykj
2nd January 2015, 11:33
I installed QT 5.3. Later I formed a symbolic link to the library. I also had to update the LD_LIBRARY_PATH to reflect the location of library. Thanks everything works now.