Results 1 to 4 of 4

Thread: qmake failure for SUBDIRS template on OSX

  1. #1
    Join Date
    Dec 2006
    Location
    Omaha, NE
    Posts
    2
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qmake failure for SUBDIRS template on OSX

    Though not new to QT in general, I am still learning the ropes for Qt/Mac so I'll start looking for help here in the Newbie forum

    I have a sizable project that uses a top-level .pro file using the SUBDIRS template to build the main execuatble as well as many plug-in libraries from sub-directories (each with their own .pro files). When I run qmake on that main .pro under Qt/Win it properly parses down to each directory making all of the necessary make files, and then nmake from that top-levels builds the entire solution. When I take the same source and attempt to qmake it on OSX I get a cascade of file-not-found failures as it tries to find each sub-project's .xcodeproj file (which is what it should be building). If I manually go to each subdirectory and qmake each and every .pro file and then go back to the top-level (the one with the SUBDIRS template) and qmake again then it claims it's happy... but loading the .xcodeproj that it builds still doesn't provide a "one-stop shop" for building the entire project at once (by loading each individual .xcodeproj file and building one at a time I do get a working solution, though).

    Can someone slap their foreheads and tell me the simple thing that I'm missing?

    I don't have my .pro files handy for posting right now, but if no one recognizes my symptoms as something common then I can post them in a follow-up.

    Thanks for any and all assistance,
    -Jason

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake failure for SUBDIRS template on OSX

    Could this be the same problem as this: http://lists.trolltech.com/qt-intere...ad00535-0.html .

    I.e. if you do not use qmake to generate makefiles it is bound to fail.

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake failure for SUBDIRS template on OSX

    Quote Originally Posted by lonejedi View Post
    Can someone slap their foreheads and tell me the simple thing that I'm missing?
    I don't think you're missing anything. I get the same problem when using the macx-xcode makespec. If you can tolerate the hassle of typing "make" in the command line, try using the macx-g++ makespec.

  4. #4
    Join Date
    May 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake failure for SUBDIRS template on OSX

    Reviving an old thread, I know. It's probably worth noting that qmake (as of 4.6.2) appears to only support the SUBDIRS target where GNU Makefiles will be used.

    So on OSX with Qt Creator will work fine with subdirs. If you then run make from the command line, everything works. If you run qmake from the command line to have it generate XCode files, it won't handle the subdirs at all.

    If you try this from FreeBSD, it will generate makefiles just fine. However, those make files can only be understood with 'gmake', and not the standard BSD make.

    If you try this from Windows, you'll get makefiles that nmake cannot parse.

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 15:52
  2. qmake to build both 32-bit and 64-bit
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2006, 19:35
  3. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.