Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. [Solved]how to compile code separatly for linux and RaspberryPi with macros?
Forum Updated to NodeBB v4.3 + New Features

[Solved]how to compile code separatly for linux and RaspberryPi with macros?

Scheduled Pinned Locked Moved QtonPi
4 Posts 2 Posters 2.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.
  • C Offline
    C Offline
    criticalboot
    wrote on last edited by
    #1

    I know we can use macros like Q_OS_WIN32 and Q_OS_LINUX to build os specific code.
    how to build seperate code blocks for linux and RaspberryPi?

    Hari Prasad Kondaveeti

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

      Hi,

      Since the raspberry is an arm device you could use that fact and ifdef on the architecture.

      Or you could add a define when you build for the raspberry

      @DEFINES += RASPBERRY@

      Hope it helps

      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
      0
      • C Offline
        C Offline
        criticalboot
        wrote on last edited by
        #3

        Thanks SGaist, It helped a lot.

        Hari Prasad Kondaveeti

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

          You're welcome !

          If this answers your question please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          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
          0

          • Login

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