Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to compile for linux and mac
Forum Updated to NodeBB v4.3 + New Features

How to compile for linux and mac

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thippu
    wrote on last edited by thippu
    #1

    Hi Guys,
    I'm using the Qt 5.10 and I want my application to run on the Linux and Mac and I can achieve this using Qt?.
    help me @jsulm , @SGaist

    jsulmJ sierdzioS 2 Replies Last reply
    0
    • T thippu

      Hi Guys,
      I'm using the Qt 5.10 and I want my application to run on the Linux and Mac and I can achieve this using Qt?.
      help me @jsulm , @SGaist

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @thippu Sure you can. For MacOS you will need a Mac machine. For Linux (I assume you're using Windows) the easiest way is to set up a virtual machine with Linux.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T thippu

        Hi Guys,
        I'm using the Qt 5.10 and I want my application to run on the Linux and Mac and I can achieve this using Qt?.
        help me @jsulm , @SGaist

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        @thippu said in How to compile for linux and mac:

        help me @jsulm , @SGaist

        Please don't ask people directly like that. We're all busy. If somebody with the know to help you will see your post, they will reply, don't worry.

        I'm using the Qt 5.10 and I want my application to run on the Linux and Mac and I can achieve this using Qt?

        Qt code is cross platform. What you write will compile and run on any supported platform, including Linux and macOS.

        So all you need to do is:

        • write your app using Qt
        • compile it on Linux
        • compile it on macOS
        • done :-)

        If you want to distribute your app, then a bit more work is necessary:

        • use linuxdeployqt on Linux (or some other packaging tool)
        • use macdeployqt on macOS
        • ooor use Qt installer Framework if you prefer that approach

        (Z(:^

        T 1 Reply Last reply
        3
        • sierdzioS sierdzio

          @thippu said in How to compile for linux and mac:

          help me @jsulm , @SGaist

          Please don't ask people directly like that. We're all busy. If somebody with the know to help you will see your post, they will reply, don't worry.

          I'm using the Qt 5.10 and I want my application to run on the Linux and Mac and I can achieve this using Qt?

          Qt code is cross platform. What you write will compile and run on any supported platform, including Linux and macOS.

          So all you need to do is:

          • write your app using Qt
          • compile it on Linux
          • compile it on macOS
          • done :-)

          If you want to distribute your app, then a bit more work is necessary:

          • use linuxdeployqt on Linux (or some other packaging tool)
          • use macdeployqt on macOS
          • ooor use Qt installer Framework if you prefer that approach
          T Offline
          T Offline
          thippu
          wrote on last edited by
          #4

          @sierdzio okay, Sorry for asking directly,
          Right now, I have 3rd party library linked to my project, e.g I want to use it for mac to this do I need to install the 3rd party lib to mac qt creator also?

          sierdzioS 1 Reply Last reply
          0
          • T thippu

            @sierdzio okay, Sorry for asking directly,
            Right now, I have 3rd party library linked to my project, e.g I want to use it for mac to this do I need to install the 3rd party lib to mac qt creator also?

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            @thippu said in How to compile for linux and mac:

            @sierdzio okay, Sorry for asking directly,
            Right now, I have 3rd party library linked to my project, e.g I want to use it for mac to this do I need to install the 3rd party lib to mac qt creator also?

            Depends on how you are including it, but in general yet, you need to have it installed on every platform. And you need to deploy it for every platform if you are distributing the application.

            Exactly how you deploy it will differ wildly based on multiple factors, so sadly there is no simple, easy answer here. Broadly speaking, your options are:

            • add library as dependency so system will automatically install it (that works on Linux if you distribute .deb or .rpm packages)
            • statically compile the library into your application (works on every platform, but you have to make sure you fulfill library's license, and you'll have to manually compile it for every platform)
            • bundle prebuilt library with your app (works on most platforms, but watch the license and you may need to)

            (Z(:^

            1 Reply Last reply
            2
            • T Offline
              T Offline
              thippu
              wrote on last edited by
              #6

              Thank you @jsulm , @sierdzio , I will try to install.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved