PDA

View Full Version : QMake Platform Flags Problems



DanKolle
9th December 2014, 10:57
Hello,

I have a pro file and encountered two problems which I do not understand. Maybe some one can help me.
I am using Qt 5.4 on a Mac as well as in a Parallels Windows VM.

When I use an 'else' like this:

win32
{
}
else
{
}

I get a parse error saying that 'else' is unexpected.

When I use the infamous Macintosh flag setup

unix:!macx
{
LIBS = OhNoooo
}

This still applies to Mac, even better is also applies to Windows.

I have seen both cases a lot across the internet so I would expect them to work. Could someone point me in the right direction?

Thanks
Dan

anda_skoa
9th December 2014, 11:07
I think the opening brace needs to go on the same line as the condition.
Same for the else block

Cheers,
_

DanKolle
9th December 2014, 11:20
Thanks this was indeed the problem.

win32
{
}

does not work

win32 {
}

works fine