PDA

View Full Version : qmake and object_script



TheRonin
8th March 2007, 17:51
I have been using Qt for a little while and usually when i run qmake i get three files

Makefile
Makefile.Debug
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.

camel
8th March 2007, 18:29
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 ;-)

TheRonin
9th March 2007, 09:15
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.

camel
9th March 2007, 09:27
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 ;-)

TheRonin
9th March 2007, 09:40
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 :D