Results 1 to 2 of 2

Thread: How do you link libraries in an imported "MakeFile Based" Project?

  1. #1
    Join Date
    Apr 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How do you link libraries in an imported "MakeFile Based" Project?

    I know how to do it with a .pro file, but when you use the "Import MakeFile Based Project" option in QT-Creator, this is not an option. I rather not use qmake -project to generate a .pro since I already have a functioning makefile and everything.

    I have .includes .create .config and .files. Which of these do I add the code to? Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How do you link libraries in an imported "MakeFile Based" Project?

    I have no idea what you are talking about with, "I have .includes .create .config and .files."

    You need to adjust the Makefile so that:
    • The compiler is given appropriate options for any include paths that need to be added. These would be "-I" options for GCC. If to be applied globally you might just be able to add them to a CFLAGS variable.
    • The linker is given appropriate options for any library paths that need to be added and any libraries that should be considered during linking. These would be "-L" and "-l" options for the GNU linker. If to be applied globally you might just be able to add them to a LFLAGS variable.

    How you do these things is dependent on how your Makefile is structured, which compiler and linker you are using, and sometimes on which make utility you are using. If your Makefile is generated by a "configure" script of some sort you should look for options to add these things.

Similar Threads

  1. Library build from imported makefile project
    By waynew in forum Installation and Deployment
    Replies: 0
    Last Post: 27th October 2010, 01:27
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. Replies: 3
    Last Post: 8th July 2008, 19:37
  4. "Treat wchar_t as Built-in Type" to "yes" link error
    By sungaoyong in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2008, 11:45
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.