Results 1 to 5 of 5

Thread: How to build static lib .a on QTcreator windows 7

  1. #1
    Join Date
    Mar 2010
    Posts
    92
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default How to build static lib .a on QTcreator windows 7

    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:

    Qt Code:
    1. int sumint(int a,int b)
    2. {
    3. return a+b;
    4. }
    To copy to clipboard, switch view to plain text mode 


    can you help me ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to build static lib .a on QTcreator windows 7

    What exactly is the problem? Creating a library in Qt Creator doesn't differ in any way from creating it in Notepad.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2010
    Posts
    92
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to build static lib .a on QTcreator windows 7

    Quote Originally Posted by wysota View Post
    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?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to build static lib .a on QTcreator windows 7

    Quote Originally Posted by nhs_0702 View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to build static lib .a on QTcreator windows 7

    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.

Similar Threads

  1. Replies: 1
    Last Post: 13th January 2010, 23:35
  2. I Can't use QtCreator to static build my application
    By kyosold in forum Installation and Deployment
    Replies: 3
    Last Post: 6th January 2009, 10:20
  3. Please Help-->have few doubts with Static build in Windows !
    By Krish in forum Installation and Deployment
    Replies: 1
    Last Post: 17th March 2008, 14:37
  4. Windows XP Qt 4.3.2 Static build
    By maxpower in forum Installation and Deployment
    Replies: 9
    Last Post: 2nd November 2007, 04:49
  5. Build static on windows without deps on mingwm10.dll
    By ucomesdag in forum Qt Programming
    Replies: 2
    Last Post: 9th July 2007, 05:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.