如何设置 qwt 路径或环境变量
我已经安装了 qwt 并将路径包含
INCLUDEPATH += /usr/local/qwt-6.0.0-rc5/include
LIBS += -L/usr/local/qwt-6.0.0-rc5/lib -lqwt
在我的配置文件中。
但是当我运行我的程序时,我收到错误
error while loading shared libraries: libqwt.so.6: cannot open shared object file: No such file or directory /home/cv/abc/abc exited with code 127
当使用终端时我设置了路径
export LD_LIBRARY_PATH=/usr/local/qwt-6.0.0-rc5
然后当我运行程序(使用界面的播放按钮)时我仍然收到错误。我不知道我错在哪里,我完全陷入困境。有人可以详细解释一下如何让 qwt 与 qt 一起工作吗?版本有什么区别吗?请详细解释一下我将非常感谢!
我使用的是ubuntu 10.04。
谢谢
I have installed qwt and include the path
INCLUDEPATH += /usr/local/qwt-6.0.0-rc5/include
LIBS += -L/usr/local/qwt-6.0.0-rc5/lib -lqwt
in my profile.
But when I run my program i get the error
error while loading shared libraries: libqwt.so.6: cannot open shared object file: No such file or directory /home/cv/abc/abc exited with code 127
When using terminal I set the path
export LD_LIBRARY_PATH=/usr/local/qwt-6.0.0-rc5
Then when I run the program (using the play button of the interface) I am still getting an error. I don't know where I'm wrong, I'm totally stuck. Can someone explain me in detail how to make qwt work with qt? Does version make any difference? Please explain me in detail I shall be very thank full!
I am using ubuntu 10.04.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可以通过ubuntu方式安装qwt
aptitude install libqwt-dev
此外,在 qtreator 中您还可以为您的项目指定运行环境。在左侧面板中选择“项目”,然后转到“运行设置”。
You can install qwt in ubuntu way
aptitude install libqwt-dev
Also in qtreator you can specify Run Enviroment for your project. Select Projects in left panel and goto Run Setting.
您是否将 Qwt 的路径添加到运行时链接器中?
在
/etc/ld.so.conf.d/
中创建一个文件qwt.conf
,您只需在其中写入[your-qwt-path]/ 的路径库
。编辑:当然,您需要 root 权限才能在那里创建文件。另外,我忘了提及创建该文件后您将需要
sudo ldconfig
。最后,直到我重新启动系统后它才起作用。 :)Did you add the path to Qwt to the run-time linker?
In
/etc/ld.so.conf.d/
create a fileqwt.conf
where you just write the path to[your-qwt-path]/lib
.EDIT: You will, of course, need root privileges to create a file there. Also, I forgot to mention you will need to
sudo ldconfig
after creating that file. Lastly, it didn't work until I rebooted my system. :)