You're right! the question was about rc file.
Then, how about a pre-build step that will run
cl <enter>, parse the version number out of the output, and produce
an include for a rc2 file. Put the version resource into .rc2 to avoid
creating it automatically.
--PA
Ben Voigt [C++ MVP] wrote:
Quote:
Pavel A. wrote:
Quote:
>Charles R wrote:
Quote:
>>Not sure I understand what your saying.
>_MSC_VER is a predefined macro that equals to the compiler version.
>So you can use it for conditional compilation, to distinguish between
>VC6 and 2008.
>
But only set by the C or C++ compiler, I believe. While the VERSION
resource is processed by the resource compiler, rc.exe.
>
However setting preprocessor defines in the project settings should work,
but some manual editing of the .rc file may be necessary to make it work.
>
Quote:
>--PA
>>
>>
>>
Quote:
>>"Pavel A." wrote:
>>>
>>>_MSC_VER ?
>>>>
>>>Charles R wrote:
>>>>I have two different executables that I want to build w/ the same
>>>>source but in 2 different compilers, vs60 and vs2008. I have 2
>>>>different configurations w/ different options etc, but I want one
>>>>to be version 1.0 and another 3.0. Anyway to do this easily using the
>>>>same .rc file? I couldnt
>>>>figure how to use the condition property of the VERSION. I did
>>>>this years ago, but forgot. I tried defining a condition
>>>>parameter, then adding it to the Preprocessor definitions in the
>>>>configurations, but both executables always had the same version.
>>>>>
>>>>Any ideas? TIA
>>>>-C
>
>