On 04/10/2016 03:03 PM, Zekereth wrote:
So I was just testing some code and couldn't figure out why it wasn't
working. My version block looked like this:
version(Linux)
{
...
}
Looking at the list(unless I'm missing something) Linux is the only OS
that is lowercase. I'm guessing most people use Posix instead and never
encounter this problem.
Regard,
Zekereth
As a workaround, you can set version to Linux yourself:
version (linux) {
version = Linux;
}
void main() {
version (Linux) {
import std.stdio;
writeln("Linux worked!");
}
}