Qt-interest Archive, January 2007
Question about qmake and debug/release configurations
Message 1 in thread
Hi. I have a .pro file that I am using to generate a Visual Studio
project file. I currently have a line that looks like this:
win32:LIBS += MSVCPRT.LIB msvcrt.lib
This results in a working Release configuration. However, I also
would like a working Debug configuration. Currently I have to
manually alter the properties for the debug configuration to specify
debug versions of these libraries.
Is it possible to change the .pro file so that it will have a debug
and release case?
Thanks.
Brant Sears
--
[ signature omitted ]
Message 2 in thread
On 31.01.07 13:16:02, Brant Sears wrote:
> Hi. I have a .pro file that I am using to generate a Visual Studio project
> file. I currently have a line that looks like this:
>
> win32:LIBS += MSVCPRT.LIB msvcrt.lib
>
> This results in a working Release configuration. However, I also would like a
> working Debug configuration. Currently I have to manually alter the properties
> for the debug configuration to specify debug versions of these libraries.
>
> Is it possible to change the .pro file so that it will have a debug and release
> case?
Yes, see the qmake documentation about the CONFIG variable on how to do
that.
Andreas
--
[ signature omitted ]
Message 3 in thread
OK, I did look at the docs for CONFIG.
What I tried was this:
I changed:
CONFIG += embed_manifest_exe
to:
CONFIG += debug_and_release embed_manifest_exe
Then I changed my LIBS += line to the following:
debug {
win32:LIBS += MSVCPRTd.LIB msvcrtd.lib
}
release {
win32:LIBS += MSVCPRT.LIB msvcrt.lib
}
The result was that both the debug and release versions of these were
added to both configurations. This isn't what I intended.
I think I don't understand what CONFIG actually does.
On Jan 31, 2007, at 1:40 PM, Andreas Pakulat wrote:
> On 31.01.07 13:16:02, Brant Sears wrote:
>> Hi. I have a .pro file that I am using to generate a Visual Studio
>> project
>> file. I currently have a line that looks like this:
>>
>> win32:LIBS += MSVCPRT.LIB msvcrt.lib
>>
>> This results in a working Release configuration. However, I also
>> would like a
>> working Debug configuration. Currently I have to manually alter
>> the properties
>> for the debug configuration to specify debug versions of these
>> libraries.
>>
>> Is it possible to change the .pro file so that it will have a
>> debug and release
>> case?
>
> Yes, see the qmake documentation about the CONFIG variable on how
> to do
> that.
>
> Andreas
>
> --
> You will be the victim of a bizarre joke.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 4 in thread
On 31.01.07 14:35:31, Brant Sears wrote:
> OK, I did look at the docs for CONFIG.
>
> The result was that both the debug and release versions of these were added to
> both configurations. This isn't what I intended.
>
> I think I don't understand what CONFIG actually does.
You did understand correctly, however there's also a CONFIG() function
int he function reference. I thought there would be a link from the
variable section but there isn't. Sorry for the confusion.
Basically you want
CONFIG(release, debug|release)
{
release stuff
}
CONFIG(debug, debug|release)
{
debug stuff
}
Andreas
--
[ signature omitted ]