Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 15, 2005 version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
The compiler's changed so I can't pass these on cmd line any longer, which means can't test compile for other platforms any more. This big problem for writing libs. Please change back, or add override switch. |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to TripleShift | On Tue, 15 Mar 2005 06:12:18 +0000 (UTC), TripleShift wrote: > The compiler's changed so I can't pass these on cmd line any longer, which means can't test compile for other platforms any more. This big problem for writing libs. > > Please change back, or add override switch. This just means you can't use the Windows version of DMD to test for Linux releases, and visa versa. You can't pretend to be using the 'wrong' version of DMD. In other words, DMD is not a cross-platform compiler - you have to use the version of DMD for the platform you are targeting. -- Derek Melbourne, Australia 15/03/2005 5:40:34 PM |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | "Derek Parnell" <derek@psych.ward> wrote in message news:66o80t47yj8$.1pna13mmd0vaz.dlg@40tude.net... > On Tue, 15 Mar 2005 06:12:18 +0000 (UTC), TripleShift wrote: > >> The compiler's changed so I can't pass these on cmd line any longer, >> which means >> can't test compile for other platforms any more. This big problem for >> writing >> libs. >> >> Please change back, or add override switch. > > This just means you can't use the Windows version of DMD to test for > Linux > releases, and visa versa. You can't pretend to be using the 'wrong' > version > of DMD. In other words, DMD is not a cross-platform compiler - you > have to > use the version of DMD for the platform you are targeting. Not true. I've used it for that also in past, and its worked fine. |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jamboree | On Tue, 15 Mar 2005 17:46:36 +1100, Jamboree wrote: > "Derek Parnell" <derek@psych.ward> wrote in message news:66o80t47yj8$.1pna13mmd0vaz.dlg@40tude.net... >> On Tue, 15 Mar 2005 06:12:18 +0000 (UTC), TripleShift wrote: >> >>> The compiler's changed so I can't pass these on cmd line any longer, >>> which means >>> can't test compile for other platforms any more. This big problem for >>> writing >>> libs. >>> >>> Please change back, or add override switch. >> >> This just means you can't use the Windows version of DMD to test for >> Linux >> releases, and visa versa. You can't pretend to be using the 'wrong' >> version >> of DMD. In other words, DMD is not a cross-platform compiler - you >> have to >> use the version of DMD for the platform you are targeting. > > Not true. I've used it for that also in past, and its worked fine. I was talking about what applies *now*, not what you used to be able to do. You may have to resort to a trick like this ... <code> import std.stdio; version(NIX) version=linux; version(GATES) version=Windows; char[] graf; void main() { version(linux) { graf = "linux rules!"; } else // <<< Don't forget the 'else'! version(Windows) { graf = "MS-Windows(tm) rules!"; } writefln("%s", graf); } </code> then compile it with ... dmd myprog -version=NIX and dmd myprog -version=GATES -- Derek Melbourne, Australia 15/03/2005 6:23:05 PM |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to TripleShift | Wasn't it
version=windows
version=Linux
A small w and a big L.
(I'm not at a DMD computer right now, but I think that could be it.)
TripleShift wrote:
> The compiler's changed so I can't pass these on cmd line any longer, which means
> can't test compile for other platforms any more. This big problem for writing
> libs.
>
> Please change back, or add override switch.
>
>
|
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | Georg Wrede wrote: > Wasn't it > version=windows > version=Linux > > A small w and a big L. Nope, it was Windows and then linux,cygwin,freebsd,darwin,solaris... > (I'm not at a DMD computer right now, but I think that could be it.) Setting the OS versions was made illegal, that's why it doesn't work. --anders |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jamboree | Jamboree wrote: > "Derek Parnell" <derek@psych.ward> wrote in message news:66o80t47yj8$.1pna13mmd0vaz.dlg@40tude.net... <snip> >> This just means you can't use the Windows version of DMD to test >> for Linux releases, and visa versa. You can't pretend to be using >> the 'wrong' version of DMD. In other words, DMD is not a >> cross-platform compiler - you have to use the version of DMD for >> the platform you are targeting. > > Not true. I've used it for that also in past, and its worked fine. Used it for what? Cross-compiling, or checking that the other-platform code is valid? Preventing the user from doing the latter seems an arbitrary restriction. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote...
><code>
>import std.stdio;
>
>version(NIX) version=linux;
>version(GATES) version=Windows;
>
>char[] graf;
>
>void main()
>{
> version(linux)
> {
> graf = "linux rules!";
> }
> else // <<< Don't forget the 'else'!
> version(Windows)
> {
> graf = "MS-Windows(tm) rules!";
> }
>
> writefln("%s", graf);
>}
>
></code>
>
>then compile it with ...
> dmd myprog -version=NIX
>
>and
>
> dmd myprog -version=GATES
Just wanted to mention the above works perfectly, as was stated. Very handy source example.
AEon
|
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
> Georg Wrede wrote:
>
>> Wasn't it
>> version=windows
>> version=Linux
>>
>> A small w and a big L.
>
>
> Nope, it was Windows and then linux,cygwin,freebsd,darwin,solaris...
>
>> (I'm not at a DMD computer right now, but I think that could be it.)
>
> Setting the OS versions was made illegal, that's why it doesn't work.
Thanks! :-)
Seems I remembered there was an inconsistency, but not what.
:-) (Could it be that Walter is a Windows person?) :-)
|
March 15, 2005 Re: version=Windows / version=linux illegal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon wrote: <snip> > Used it for what? Cross-compiling, or checking that the other-platform code is valid? > > Preventing the user from doing the latter seems an arbitrary restriction. JTAI, if we're going to allow setting these predefined versions, then we ought to have a way of switching off versions defined for the local platform. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
Copyright © 1999-2021 by the D Language Foundation