Nominate our 2022 Qt Champions!

Porting from Windows to OSX and iOS

  • I have made a previous build on Windows and I am trying to port everything to OSX and iOS. I am following the directions given here:

    The problem I am having is I have a file being copied to the build from an external source. So what I did in the Windows build is something like this in the .pro:

    QMAKE_POST_LINK = copy $${SRCDIR}\file.h $${DESTDIR}
    message(POST: $${QMAKE_POST_LINK})

    This worked on windows, but on OS X, I am getting an error saying “copy” is not a file or directory. It is acting as if it is part of the source directory in the code above. Is there a different syntax or something I am missing?

    Also, when I am trying to port to iOS, I am getting an error saying:

    Project ERROR: Unknown module(s) in QT: serialport

    is this module not supported on iOS?

  • Lifetime Qt Champion


    copy is a windows command, you should use:


    Which will be replaced by the right command.

    As for the QtSerialPort module, from the top of my head, i'd say no.

  • Yes! I got it SGaist. What actually worked was as follows:

    @$(cp $${SRCDIR}/file.h $${DESTDIR})@

  • Lifetime Qt Champion

    It should rather be:

    @$(COPY) $${SRCDIR}/file.h $${DESTDIR}@

    So you don't have to have a similar line for each platform

Log in to reply