How to use a shared library - beginner
I downloaded QLed plugin from the follwing link:
http://qt-apps.org/content/show.php/QLed+?content=72482
Then I compiled it successfully. Then got the file libqledplugin.so (I'm using ubuntu 10.04) in the build directory.
I just copied that file into my test project folder and compiled but getting the following error:
libqledplugin: no such file or directory
The test project was the same example downloaded along with the stuff in the above link. In .pro file the following code:
LIBS += libqledplugin
is already added in the example file. I don't know how to compile it successfully. Please help, I am a beginner.
Re: How to use a shared library - beginner
You just need to give the name of library
LIBS += -lqledplugin
also if you want to give path,
LIBS += L<lib path> -l<libname>
Re: How to use a shared library - beginner
I already added,
LIBS += qledplugin
I am getting another error when adding
LIBS += -qledplugin
I copied the .so file into the current project directory. Is there any need to give the path explicitly? If I add path as you said, I am getting the same error.
Added after 1 16 minutes:
Hi there,
I got worked the program for the first time. But it works only when
1)adds LIBS+= libqledplugin.so into the .pro file
2)the same file is copied into qt/lib directory
How to include the path in to the working directory? I used INCLUDEPATH but no use. I insist present directory because of the easiness while sharing the program to other computers.