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. Multi-platform build
Forum Updated to NodeBB v4.3 + New Features

Multi-platform build

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 271 Views 2 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I have a C++ project that sometime ago I developed on RedHat Linux. This project was always intended to be multi-platform. However, today I tried to build on Windows 10. Lots of differences to resolve.

    My project uses sockets and posix functions. Is there any easier way to manage multi-platform builds?

    Right now I'm using _WIN32 and _WIN64 preprocessors for windows, just about everything else, linux and apple builds are standard and do no require pre-processors.

    Sockets seems to be one of the biggest hurdles, in the linux code it's quite simple, open, read, write and close, windows isn't so straight forward, instead of write there is a send method and the parameters required are a little different.

    Kind Regards,
    Sy

    J.HilkJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      I have a C++ project that sometime ago I developed on RedHat Linux. This project was always intended to be multi-platform. However, today I tried to build on Windows 10. Lots of differences to resolve.

      My project uses sockets and posix functions. Is there any easier way to manage multi-platform builds?

      Right now I'm using _WIN32 and _WIN64 preprocessors for windows, just about everything else, linux and apple builds are standard and do no require pre-processors.

      Sockets seems to be one of the biggest hurdles, in the linux code it's quite simple, open, read, write and close, windows isn't so straight forward, instead of write there is a send method and the parameters required are a little different.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @SPlatten
      Doesn't sound like you're using a lot of Qt in your project?

      QT has cross platform socket classes that should work/compile with out much issues, when ported from one platform to an other.

      If you're using the posix api directly, than you'll have to write a windows equivalent class on your own as well.
      Normally you would go through the abstraction layer, Qt provides.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1
      • SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #3

        My project is using a lot of Qt, but my ignorance is to blame, I didn't know Qt had its own classes for sockets.

        Kind Regards,
        Sy

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You will likely be interested by the Qt network module.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            Thank you

            Kind Regards,
            Sy

            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