PDA

View Full Version : How to create and use a static library or a share library with Qt Creator?



huychuongctt
17th February 2011, 03:00
Hi all,
I don't know how to create a static library or a share library and use it.
Can you show me how to do it?
Thank you very much.

franz
17th February 2011, 07:50
Create a new project. In the project wizard, choose "Other Project" and then "C++ Library". Proceed as you do normally with programs. To use it, add a line

LIBS += -L/path/to/library -lmylib
to your .pro file.

http://doc.trolltech.com/latest/qmake-common-projects.html#building-a-library

posixprogrammer
19th February 2011, 11:26
Hi all,
I create a shared object ( dynamic library) by Eclipse IDE and I can use this *.so for Qt Creator, Eclipse. But when I create a shared object by Qt Creator, I can not use it on both Eclipse , Qt Creator. I use "ldd" command to check it, I see no problem.
Please tell me why?