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. Modifying Makefiles directly...the right way to do it?
Forum Update on Monday, May 27th 2025

Modifying Makefiles directly...the right way to do it?

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 3.5k Views
  • 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
    tachoknight
    wrote on last edited by
    #1

    Hi all-

    Okay, I've been playing around with QT long enough that I'm starting to work with "real" projects that require including other libraries. Being used to IDEs like Eclipse and VS, I figured I'd add my additional library paths somewhere in QT Creator, and it kind of looks like that with the "Make arguments" edit box, but it appears that does not seem to actually affect the build.

    I went into the build directory and modified the Makefile.Debug and Makefile.Release files directly to include my extra -I and -L parameters, and it built correctly.

    I couldn't find any specific information about what is the "right" way to do this; is modifying the files the proper way to do it? I don't mind modifying the files directly, but wanted to make sure they weren't going to get deleted then recreated by QT Creator for some reason, losing my changes.

    Thanks for any info,

    Ron

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Please do not modify the generated Makefiles. Your changes will get overridden as soon as you run qmake. Edit the .pro-file instead (syntax is much nicer too, at least as long as you do simple things:-) and run qmake again.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        See "Declaring Other Libraries":http://doc.qt.nokia.com/4.7/qmake-project-files.html#declaring-other-libraries in the qmake docs for enhancing your .pro file. Whenever you re-run qmake the changes in the generated makefiles are overwritten.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tachoknight
          wrote on last edited by
          #4

          Thanks a lot for the info; I didn't find that section in the documentation (I guess sometimes Google isn't my friend ;))

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            You're welcome. Sometimes the old aunt google is picky about what she's telling you :-)

            http://www.catb.org/~esr/faqs/smart-questions.html

            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