how to set qwt path or environment variable

℡╲_俬逩灬. 提交于 2020-01-16 09:15:21

问题


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


回答1:


  1. You can install qwt in ubuntu way

    aptitude install libqwt-dev

  2. Also in qtreator you can specify Run Enviroment for your project. Select Projects in left panel and goto Run Setting.




回答2:


Did you add the path to Qwt to the run-time linker?

In /etc/ld.so.conf.d/ create a file qwt.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. :)



来源:https://stackoverflow.com/questions/5375523/how-to-set-qwt-path-or-environment-variable

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