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
Was it helpful?

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
scroll top