Qt-interest Archive, October 2007
How to edit *.pro to generate static libs for debug and release?
Message 1 in thread
qmake users,
I am trying to compile a library, does anyone know how to edit the *.pro
file so that
1) the library type is staticlib, and
2) the output distinguishes debug (*_d.lib) and release (*.lib)
?
Thanks in advance,
Lingfa
--
[ signature omitted ]
Message 2 in thread
Lingfa,
On Tuesday 02 October 2007, Lingfa Yang wrote:
> qmake users,
>
> I am trying to compile a library, does anyone know how to edit the
> *.pro file so that
> 1) the library type is staticlib, and
CONFIG += staticlib
> 2) the output distinguishes debug (*_d.lib) and release (*.lib)
CONFIG(debug, debug|release) {
TARGET = your_debug_target
}
else {
TARGET = your_release_target
}
Best,
Pete
--
[ signature omitted ]
Message 3 in thread
Pete Black wrote:
>Lingfa,
>
>On Tuesday 02 October 2007, Lingfa Yang wrote:
>
>
>>qmake users,
>>
>>I am trying to compile a library, does anyone know how to edit the
>>*.pro file so that
>>1) the library type is staticlib, and
>>
>>
>
>CONFIG += staticlib
>
>
>
>>2) the output distinguishes debug (*_d.lib) and release (*.lib)
>>
>>
>
>CONFIG(debug, debug|release) {
> TARGET = your_debug_target
>}
>else {
> TARGET = your_release_target
>}
>
>Best,
>Pete
>
>
Pete,
Thanks for your reply. But, it does not work.
My pro:
...
CONFIG += staticlib
CONFIG(debug, debug|release) {
TARGET = dlgptn_d.lib
} else {
TARGET = dlgptn.lib
}
After type in:
qmake -tp vc
I obtained a project named "dlgptn_d.lib.vcproj"
When I open that proj by vs2003 I have a wrong type:
Configuration Type: Application (.exe)
Do you know why the type setting was ignored?
(BTW: I am on WindowsXp, vs2003 and Qt 4.3.1)
Regards,
Lingfa
--
[ signature omitted ]
Message 4 in thread
Lingfa Yang <lingfa@xxxxxxx> wrote on 10/03/2007 08:00:56 AM:
# Thanks for your reply. But, it does not work.
# My pro:
# ...
# CONFIG += staticlib
# CONFIG(debug, debug|release) {
# TARGET = dlgptn_d.lib
# } else {
# TARGET = dlgptn.lib
# }
#
# After type in:
# qmake -tp vc
#
# I obtained a project named "dlgptn_d.lib.vcproj"
# When I open that proj by vs2003 I have a wrong type:
# Configuration Type: Application (.exe)
#
# Do you know why the type setting was ignored?
You are missing a TEMPLATE=lib line; it defaults to
TEMPLATE=APP.
--
[ signature omitted ]
Message 5 in thread
Gordon.Schumacher@xxxxxxxxxxx wrote:
>You are missing a TEMPLATE=lib line; it defaults to
>TEMPLATE=APP.
>
>
Gordon,
Oh, yes, quite right!
Thanks,
Lingfa
--
[ signature omitted ]