Mickey Shine
Mickey Shine

Reputation: 12559

"cannot find -ljscore" while I am trying to build Qt 4.7.1 static library

I tried to build static Qt library from the latest source, but got the following error:

/usr/bin/ld: cannot find -ljscore
collect2: ld returned 1 exit status

How to solve this problem?

Upvotes: 2

Views: 1752

Answers (2)

Fred
Fred

Reputation: 4954

I had the exact same problem a couple of weeks ago, and I asked Nokia's support team about it (I hold a commercial licence). Their response basically is that they don't support the use of a statically linked QtWebKit, and have no intention of fixing it :

I'm afraid that building Qt with webkit statically is not supported. We don't support this configure option combination and we don't test it.

However the compile problem is not difficult to resolve. As I tried, you just have to modify the searching path for libjscore.a to let it find the lib file.

As Frank Osterfeld said, simply copying libjscore.a and libjscore.prl to a place where ld can find it will fix it.

Upvotes: 3

Frank Osterfeld
Frank Osterfeld

Reputation: 25165

That's a bug in Qt's build system existing since 4.7.0 and not fixed in 4.7.1. After the failing make call, you have to copy libjscore.a and libjscore.prl (don't know their exact locations, search the Qt build tree to find them, somewhere in webkit) to the lib/ folder and rerun make.

Upvotes: 4

Related Questions