Discussion:
Conditionals in a DEF file?
(too old to reply)
Vincent Fatica
2010-06-03 16:10:00 UTC
Permalink
Is it possible to put a conditional statement in a DEF file? If so, please give
tips.

I'd like the same def file to specify "NAME FOO.DLL" or "NAME FOO64.DLL"
depending on the target of the build.

If there's another way to avoid maintaining two DEF files, that would be OK.

Thanks.
--
- Vince
David Lowndes
2010-06-03 19:30:19 UTC
Permalink
Post by Vincent Fatica
Is it possible to put a conditional statement in a DEF file? If so, please give
tips.
I'd like the same def file to specify "NAME FOO.DLL" or "NAME FOO64.DLL"
depending on the target of the build.
If there's another way to avoid maintaining two DEF files, that would be OK.
Taken from the MSDN documentation of NAME:

"An equivalent way to specify an output file name is with the /OUT
linker option"

Dave
Vincent Fatica
2010-06-03 20:26:45 UTC
Permalink
On Thu, 03 Jun 2010 20:30:19 +0100, David Lowndes <***@example.invalid>
wrote:

|>Is it possible to put a conditional statement in a DEF file? If so, please give
|>tips.
|>
|>I'd like the same def file to specify "NAME FOO.DLL" or "NAME FOO64.DLL"
|>depending on the target of the build.
|>
|>If there's another way to avoid maintaining two DEF files, that would be OK.
|
|Taken from the MSDN documentation of NAME:
|
|"An equivalent way to specify an output file name is with the /OUT
|linker option"

Are you saying to leave NAME out of the DEF file?
--
- Vince
David Lowndes
2010-06-03 20:32:42 UTC
Permalink
Post by Vincent Fatica
Are you saying to leave NAME out of the DEF file?
That seems to be the implication - I've not tried it myself.

Dave
Vincent Fatica
2010-06-03 21:19:29 UTC
Permalink
On Thu, 03 Jun 2010 21:32:42 +0100, David Lowndes <***@example.invalid>
wrote:

|>Are you saying to leave NAME out of the DEF file?
|
|That seems to be the implication - I've not tried it myself.

'Tis so. Works nicely. Thanks. [I wasted 5 minutes on a pre-build batch file
to sed foo.def into foo64.def ... completely unnecessary.]
--
- Vince
David Lowndes
2010-06-03 21:45:27 UTC
Permalink
Post by Vincent Fatica
|>Are you saying to leave NAME out of the DEF file?
|
|That seems to be the implication - I've not tried it myself.
'Tis so. Works nicely.
Jolly good. Thanks for letting us know it worked.

Dave

Loading...