Results 1 to 5 of 5

Thread: qmake and object_script

  1. #1
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qmake and object_script

    I have been using Qt for a little while and usually when i run qmake i get three files
    1. Makefile
    2. Makefile.Debug
    3. Makefile.Release


    Now all of a sudden, i'm getting object_script.myProject.Debug and object_script.myProject.Release as well. I'm wondering why these files are being generated by qmake and why they haven't shown up before. I'm using QDevelop which may or may not be responsible since it's got some trouble handling variables in the .pro file.

  2. #2
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and object_script

    Which version are you running?

    What is the contents of those files?

    What does your .pro file contain? (config etc)


    I have not seen any files like this being generated (in no Qt version I have tried) but I am curious ;-)

  3. #3
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and object_script

    Quote Originally Posted by camel View Post
    Which version are you running?
    I'm using Qt v4.2.2

    What is the contents of those files?
    INPUT(
    <list of .o files>
    );

    What does your .pro file contain? (config etc)
    CONFIG += qt debug warn_on console
    QT += network
    and 8 source files.

    I have not seen any files like this being generated (in no Qt version I have tried) but I am curious ;-)
    Me too! It appears to be directly linked to the number of files in the project. When i added the 8th (or was it the 7th?) class the files started to be generated. In other, smaller projects, i haven't seen the object_script... files. I'm guessing qmake generates the scripts to make the linker command smaller since it then doesn't need to list all the files individually. It's interesting that i haven't found any reference to object_script in the Qt documentation i've searched.

  4. #4
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and object_script

    I had a quick check in the qmake source:

    It seems to be that if the number of files is greater than
    "$$QMAKE_LINK_OBJECT_MAX" the mingw_make generator creates such a file (a "ld_script_file" to take the name of the string holding the filename).

    This file's reason for existance apears to be being fed to the "ar" and "ld" binaries.


    I would also go with your guess that the reason is to not create too long command lines.


    I do not think there is a dire need for this infomation to be in the documentation, since it seems to be "implementation detail"...unless you are curious that is ;-)

  5. #5
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and object_script

    Quote Originally Posted by camel View Post
    unless you are curious that is ;-)
    If i were a cat, i wouldn't have many lives left

    Thanks for your help, i'm glad we cleared this up

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.