Cross-platform Compilation Defines [Solved]



  • My current application builds both for Desktop (4.8.1) and Embedded Qt (4.8.6). The code is not completely platform agnostic, for my Embedded Build I include QWSServer and QWSScreenSaver and consequently don't use these for the Desktop build. At present they are wrapped by a #define that is set/un-set manually, every-time I switch between the Embedded and Desktop kit(s).

    Example:
    @#if !defined(DESKTOP_BUILD)
    QWSServer::setCursorVisible(false);
    #endif@

    Is there a more automated approach to work around this?


  • Lifetime Qt Champion

    Hi,

    @#ifdef Q_WS_QWS@

    And you shuld be good to go



  • Excellent! Thank you :)


Log in to reply
 

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