Results 1 to 14 of 14

Thread: sub-dir compilation problem

  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default sub-dir compilation problem

    Hi. I've got very annoying problem. I just cannot compile application which is spread across sub-directories. I get some kind of endless project messages loop without proper compilation. Any ideas how to solve it?
    Regards
    13 of September - Programmer Day

  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: sub-dir compilation problem

    mingw or msvc? which version? which Qt version? What shell?

  3. #3
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    mingw 3.2 and qt 4.3.2, and I've had the same problem with qt 4.2.3.
    Quote Originally Posted by wysota View Post
    What shell?
    i don't understand
    13 of September - Programmer Day

  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: sub-dir compilation problem

    shell: cmd or msys?

    What exactly happens if you feed a project such as this to qmake:
    TEMPLATE=subdirs
    SUBDIRS=s1 s2

    and in directories s1 s2 place such projects:
    TEMPLATE=app
    SOURCES=main.cpp

    and create empty main.cpp files in both dirs.

    Please paste output of qmake && make which you receive for such a configuration.

  5. #5
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    I don't know how it happened, but when I tried to compile it to get wrong output which you wanted to see, it's just compiling well. Regards
    13 of September - Programmer Day

  6. #6
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    I've got a problem, in the end of compiling edyuk, I got this error:
    Qt Code:
    1. C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lQtXmld4
    To copy to clipboard, switch view to plain text mode 
    So of course after it I got release error. What is wrong?
    Regards
    13 of September - Programmer Day

  7. #7
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: sub-dir compilation problem

    You don't seem have debug version of Qt libs built (notice that there's also a start-menu shortcut for doing so). So try:
    > make clean
    > qmake -config release
    > make
    This will compile it in release mode.
    J-P Nurmi

  8. #8
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    Ok, it helped, thanks, but there's another problem. It's compiling the same things for few times, so as it compiles the whole, it starts to compile it again, and there's no end of this loop. Regards
    13 of September - Programmer Day

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sub-dir compilation problem

    Quote Originally Posted by Salazaar View Post
    It's compiling the same things for few times, so as it compiles the whole, it starts to compile it again, and there's no end of this loop.
    Either it can't write the compilation results to the disk or there's something wrong with file modification dates.

  10. #10
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    Quote Originally Posted by jacek View Post
    Either it can't write the compilation results to the disk or there's something wrong with file modification dates.
    So, what can I do to solve it?
    13 of September - Programmer Day

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sub-dir compilation problem

    Quote Originally Posted by Salazaar View Post
    So, what can I do to solve it?
    First try passing -recursive option to qmake, if that doesn't help check if you can create new files and overwrite old ones in project's subdirectories.

  12. #12
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    I tried this two things - It hasn't helped
    13 of September - Programmer Day

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sub-dir compilation problem

    Quote Originally Posted by Salazaar View Post
    I tried this two things - It hasn't helped
    Then maybe there's something wrong with file names?

    How do you invoke qmake and make? Do you use "Qt Command Prompt"?

  14. #14
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sub-dir compilation problem

    Now everything is fine, edyuk has just set that by default it compiles with debugging, so I just had to add make release at the end
    Regards
    13 of September - Programmer Day

Similar Threads

  1. problem with debug version compilation 4.3.1
    By bruce1007 in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2007, 21:21
  2. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  3. qt4 compilation problem
    By aegis in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd February 2007, 23:10
  4. Problem and solution about QSA 1.2.0 compilation
    By Dwarf007 in forum Installation and Deployment
    Replies: 5
    Last Post: 7th March 2006, 16:52
  5. Compilation problem, don't know why
    By yellowmat in forum Newbie
    Replies: 6
    Last Post: 2nd March 2006, 15:36

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.