PDA

View Full Version : How to build static lib .a on QTcreator windows 7



nhs_0702
25th April 2010, 03:01
I want to create a static library .a by QTcreator with a platform on a windows 7,

I want to write function is simply this:


int sumint(int a,int b)
{
return a+b;
}


can you help me ?

wysota
25th April 2010, 08:48
What exactly is the problem? Creating a library in Qt Creator doesn't differ in any way from creating it in Notepad.

nhs_0702
25th April 2010, 09:20
What exactly is the problem? Creating a library in Qt Creator doesn't differ in any way from creating it in Notepad.

because I wanted to create a static library for use in other programs, I do not know how to do it how, for example, when starting to select what type of project?

wysota
25th April 2010, 10:10
for example, when starting to select what type of project?
I doesn't matter, you can always correct the .pro file later, you'll have to update it manually anyway. You can start with C++ library or Qt console application.

squidge
25th April 2010, 11:04
Create your library first using whatever module you wish, you can turn it into a .a file later when it's complete, or, don't bother with .a and link against the object code.