The main things you will need to do are in the .pro file as follows
TEMPLATE = lib CONFIG+=staticlib
If you omit the staticlib it will create a dynamic library and the runtime linker will need to be told where to find your lib.
In the project you intend to use the library in you need to set the LIBS Qt variable passing in the -L[path to lib] and -l lib(s) to link
For more examples of this see this blog post
No comments:
Post a Comment