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

不打扰是莪最后的温柔 提交于 2019-12-10 11:05:28

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4333102/cannot-find-ljscore-while-i-am-trying-to-build-qt-4-7-1-static-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!