hi there,
in VS 7.1 there are various "macros for build commands and properties"
to be used in a project's "properties". those macros include but are
not limited to:
$(ConfigurationName), $(RootNameSpace), $(ProjectName), $(TargetName),
$(WebDeployPath).
i'd like to make use of those macros not only in a project's
particular "property" (i.e. visual studio configuration). for example,
i'd like to use those macros in conjunction with the "version
resource" (versioninfo) of my project:
something like:
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
[...]
VALUE "Comments", "Built as: $(ConfigurationName)"
VALUE "FileVersion", "1, 0, 0, 1"
END
END
END
in this example the section
VALUE "Comments", "Built as: $(ConfigurationName)"
should expand to something like:
VALUE "Comments", "Built as: Unicode Debug Static"
any idea how to accomplish this?
thanks, philipp (visual studio .NET 2003, C++)
red floyd - 28 Jun 2004 18:24 GMT
> hi there,
>
[quoted text clipped - 30 lines]
>
> thanks, philipp (visual studio .NET 2003, C++)
I believe RC uses C-style macros.
On the RC command line add /D CONFIGNAME="$(ConfigurationName)"
VALUE "Comments", "Built as: " CONFIGNAME
Warning: I'm not an RC guru.
Philipp - 20 Jul 2004 12:21 GMT
> On the RC command line add /D CONFIGNAME="$(ConfigurationName)"
>
> VALUE "Comments", "Built as: " CONFIGNAME
no success, yet! i don't know where and how to set MYCONFIGNAME for
the RC.
i tried the project's "properties => resources => general =>
preprocessor definitions".
in my example there's one row present, already:
_DEBUG
so i added another one:
MYCONFIGNAME "$(ConfigurationName)"
whenever you add a definition here, it will modify the "resources =>
command line" parameters.
this is what i tried. none of them work. most of them will produce
errors:
* MYCONFIGNAME "$(ConfigurationName)"
<=> /d "MYCONFIGNAME "Unicode Debug Static""
* MYCONFIGNAME="$(ConfigurationName)"
<=> /d "MYCONFIGNAME="Unicode Debug Static""
* MYCONFIGNAME \"$(ConfigurationName)\"
<=> /d "MYCONFIGNAME \"Unicode Debug Static\""
* MYCONFIGNAME=\"$(ConfigurationName)\"
<=> /d "MYCONFIGNAME=\"Unicode Debug Static\""
* MYCONFIGNAME $(ConfigurationName)
<=> /d "MYCONFIGNAME Unicode Debug Static"
in conclusion: it's possible to "define" something: see "_DEBUG".
but i don't know how to "define" it AND assign it a value.
philipp