Results 1 to 3 of 3

Thread: static and shared build at the same time

  1. #1
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question static and shared build at the same time

    Hi,
    I can't seem to get this to work right:
    I'd like qmake to generate dll+import lib and static lib all at the same time (2x compilation of course)
    I'm talking about output files like unix libs built from msys with configure:
    library.dll
    liblibrary.dll.a
    liblibrary.a

    I'd like to get the same result from "qmake && mingw32-make all". Perhaps maybe "make dll" and "make static" to differentiate.

    Is this possible with qmake?

    Thanks

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: static and shared build at the same time

    In one case you'd need CONFIG+=staticlib, in the other not. So create two build directories, and run plain 'qmake ; make ' from one, and 'qmake "CONFIG+=staticlib" ; make' from the other.

  3. #3
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: static and shared build at the same time

    Right, I thought as much. But that still leaves me with one problem:
    I'd like to have all the targets (built files) in the same directory structure, like so:

    <project>/src - source files
    <project>/lib - project.a static and project.dll.a import lib
    <project>/bin - dll files and executables

    The problem is that I haven't found a way for qmake to make the dynamic import lib named *.dll.a. Am I overlooking some option? Thanks

Similar Threads

  1. Replies: 1
    Last Post: 14th January 2010, 00:35
  2. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 10:49
  3. build debug with shared and release with static?
    By Thor28 in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2008, 23:32
  4. STATIC vs. SHARED
    By KaptainKarl in forum Installation and Deployment
    Replies: 1
    Last Post: 27th August 2007, 17:31
  5. shared versus static build
    By jcr in forum Installation and Deployment
    Replies: 2
    Last Post: 28th January 2006, 09:05

Tags for this Thread

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.