Error while compiling in Qt (Ubuntu)
-
06-07-2019 - |
Question
I am getting the following error while compiling a sample program in Qt 4.5 in Ubuntu OS.
/usr/bin/ld: cannot find -lgthread-2.0
collect2: ld returned 1 exit status
Solution 2
I found the solution, I installed the library libqt4-dev by typing the command
sudo apt-get install libqt4-dev
and the problem got solved.
OTHER TIPS
I had a similar problem. gthread
is part of libglib
nowadays.
My solutions was to
aptitude install libglib2.0-dev libglibmm-2.4-dev
which is about a ton fewer packages than what libqt4-dev
with friends pulled in.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow