Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Different Directories for different environment (windows/linux/...)

Different Directories for different environment (windows/linux/...)

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 2.8k 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.
  • G Offline
    G Offline
    giugiu
    wrote on last edited by
    #1

    Hi guys,
    I would like to share the same project files among different OS.

    But how to manage the different outputdirectories and/or compiler?

    In the 'build settings' I created two 'build configuration', one named 'Linux Release'
    and another 'Windows Release'.

    But when I leave Linux to open the project using Windows, or viceversa,
    I get a message 'Project setting file from a different environment,
    do you still want to load the setting file?'

    Clicking on yes, all is selected for the 'Linux configuration', I have to reset
    all again, and so on...

    Any way to manage that?
    Thanks in advance

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Never use the ".pro.user" file on another OS/ machine. When copying the sources (or using source management), do not copy that file. Instead, set the build config separately on every machine.

      If you want your project to build nicely on every OS, you should use special qmake instructions instead (like DESTDIR, OBJECTS_DIR, MOC_DIR, RCC_DIR). With those, you can make sure your project will build as you want every time - even when other people are building it.

      (Z(:^

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hostel
        wrote on last edited by
        #3

        Like sierdzio says - read about "qmake variables":http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html

        In "qmake advanced usage":http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html you will find info how to make conditions for different OS.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giugiu
          wrote on last edited by
          #4

          Thanks a lot, I agree with your suggestion

          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