Problem with QMAKE and multi platform PRO file always thinks it under Unix



  • Hi guys I having troubles running multi platform config in my pro file on Windows 7 64 bit
    It looks like qmake always thinks I'm on Unix:

    @win32 {
    message(win32)
    }
    win64 {
    message(win64)
    }
    macx {
    message(macx)
    }
    unix:!macx{
    message(unix)
    }@

    Always prints 'unix'

    Well I have not tried on anything but Windows, but I want to work in on windows first!

    This is under QTCreator 3.1.2 and QT 5.3.1



  • Hmm that's strange, I make a new simple Widgets app and tested your .pro text and it printed Project MESSAGE: win32
    (I'm using Qt Creator 3.2.0 and Qt 5.3.1 on Windows 7 64-bit)



  • I do have default project created by QTCreator Wizard, and when I add this to it it says I'm on Unix !!!
    Is it possible that something like Cygwin or GNU32 DiffUtils can mess-up QMAKE ?
    I will also try on it separate PC!



  • Tried on another Win7 PC which doesn't have thing like Cygvin and other unixy stuff installed, same story.
    Also tried with older QT 5.0.2 I still keep... still detect it like Unix! What I'm missing ??!!!!!



  • Guys, I want to understand what are those switches are?
    Do they defined your current host platform or they define you targeting platform?

    [quote author="hskoglund" date="1410537252"]Hmm that's strange, I make a new simple Widgets app and tested your .pro text and it printed Project MESSAGE: win32
    (I'm using Qt Creator 3.2.0 and Qt 5.3.1 on Windows 7 64-bit)
    [/quote]
    What is your target platform for project you tested it under? In my case it was Blackberry10



  • Hi, target = Windows 7 64-bit.



  • [quote author="hskoglund" date="1411051235"]Hi, target = Windows 7 64-bit.[/quote]

    Well I think this is why it reports win32, if you can change it to Android or something and see what it will report.
    I cross compiling my stuff for ARM (BB10) so my host platform and target platform are different.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.