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. Why do we use -L and l preceeding .pro file lines
Forum Updated to NodeBB v4.3 + New Features

Why do we use -L and l preceeding .pro file lines

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 187 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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by
    #1

    I know that L means an array of wide characters (wchar_t) instead of narrow characters (char)
    But why do we have to use it in pro file?
    And what mean lowercase -l before line ?
    LIBS += -lX11

    Chris KawaC 1 Reply Last reply
    0
    • J JacobNovitsky

      I know that L means an array of wide characters (wchar_t) instead of narrow characters (char)
      But why do we have to use it in pro file?
      And what mean lowercase -l before line ?
      LIBS += -lX11

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      @JacobNovitsky L in C++ code has nothing to do with L in pro files.
      LIBS variable specifies the arguments passed to the linker invocation.
      The -L parameter specifies a directory to look for linked libraries and -l specifies a library name to look for in that directory, so a line like
      LIBS += -LSomeDir/SomeSubdir/ -lsome means "Look for library libsome in directory SomeDir/SomeSubdir/ and link it".

      See your linker documentation for more detailed explanation e.g. this one for the gnu linker.

      1 Reply Last reply
      5

      • Login

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