Thread overview | |||||
---|---|---|---|---|---|
|
July 15, 2004 DMD compiler multiple -version | ||||
---|---|---|---|---|
| ||||
Hello, is it possible to have something like this in D (in a context where I am interfacing with C code) version(32Bits) { version(Windows) { ... } version(MacOs) { ... } } version(64Bits) { version(Windows) { ... } version(MacOS) { ... } } how do I tell the D compiler to compile the 32Bits and MacOS version code ? Best regards Pac |
July 15, 2004 Re: DMD compiler multiple -version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pac | Pac wrote:
> Hello,
>
>
> is it possible to have something like this in D (in a context where I am interfacing with C code)
>
> version(32Bits)
> {
> version(Windows)
> {
> ...
> }
>
> version(MacOs)
> {
> ...
> }
> }
>
> version(64Bits)
> {
> version(Windows)
> {
> ...
> }
>
> version(MacOS)
> {
> ...
> }
> }
>
>
> how do I tell the D compiler to compile the 32Bits and MacOS version code ?
To start with, I don't think version identifiers can start with a digit. You'll have rename them.
As for your question, you can either specify "-version=_32Bits -version=Windows" on the DMD commandline, or, in the source code, you can say "version=_32Bits;" to define a version flag.
-- andy
|
July 16, 2004 Re: DMD compiler multiple -version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andy Friesen | > > how do I tell the D compiler to compile the 32Bits and MacOS version code ? > > As for your question, you can either specify "-version=_32Bits -version=Windows" on the DMD commandline, or, in the source code, you can say "version=_32Bits;" to define a version flag. Is there any way to "deregister" a version? e.g. I am in a Linux environment and don't want to include the "version=linux" parts. Thomas |
Copyright © 1999-2021 by the D Language Foundation