The 'lib' template tells qmake to generate a makefile that will build a library. When using this template, in addition to the system variables mentioned above for the 'app' template the VERSION variable is supported.
The 'subdirs' template tells qmake to generate a makefile that will go into the specified subdirectories and generate a makefile for the project file in the directory and call make on it. This variable contains a list of all the subdirectories that contain project files to be processed. It is essential that the project file in the sub directory has the same name as the subdirectory, so that qmake can find it. For example, if the subdirectory is called 'myapp' then the project file in that directory should be called myapp.
The config variable specifies the options that the compiler should use and the libraries that should be linked against. Appropriate commands for other platforms can be defined using other scope rules. Commands specified in the extra member are executed before the instructions in the other members of the object are performed. If you append a built-in install set to the INSTALLS variable and do not specify files or extra members, qmake will decide what needs to be copied for you.
Currently, the only supported built-in install set is target :. In the above lines, qmake knows what needs to be copied, and will handle the installation process automatically. The cache file is a special file qmake reads to find settings not specified in the qmake.
If -nocache is not specified when qmake is run, it will try to find a file called. If it fails to find this file, it will silently ignore this step of processing. If it finds a. Often when linking against a library, qmake relies on the underlying platform to know what other libraries this library links against, and lets the platform pull them in.
In many cases, however, this is not sufficent. For example, when statically linking a library, no other libraries are linked to, and therefore no dependencies to those libraries are created. However, an application that later links against this library will need to know where to find the symbols that the static library will require.
To help with this situation, qmake attempts to follow a library's dependencies where appropriate, but this behavior must be explicitly enabled by following two steps. The first step is to enable dependency tracking in the library itself. To do this you must tell qmake to save information about the library:. This is only relevant to the lib template, and will be ignored for all others. When this option is enabled, qmake will create a file ending in. This metafile is just like an ordinary project file, but only contains internal variable declarations.
You are free to view this file and, if it is deleted, qmake will know to recreate it when necessary, either when the project file is later read, or if a dependent library described below has changed. It seems like a common problem and I did do some research before posting. I have also tried playing around with the values, but it seems that qmake can't see that variable at all QTDIR is also specified properly.
From 4. For more detail, consult the Configuring qmake's Environment for qmake 4. Ok, sorry, I think I know what's the problem. I have deleted it now, and going to re-try installing Qt. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Thread Tools Show Printable Version.
I worked on windows Xp with Qt 4. Originally Posted by Shuchi Agrawal. So i wil be greatful to you if u can help me in this. Originally Posted by vermarajeev. Hope this helps. QPushButton hello "Hello world! To copy to clipboard, switch view to plain text mode.
0コメント