Important: Please read the Qt Code of Conduct -

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).

    @#if !defined(DESKTOP_BUILD)

    Is there a more automated approach to work around this?

  • Lifetime Qt Champion


    @#ifdef Q_WS_QWS@

    And you shuld be good to go

  • Excellent! Thank you :)

Log in to reply