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. Search for all libs in a directory
Forum Updated to NodeBB v4.3 + New Features

Search for all libs in a directory

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.0k 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.
  • S Offline
    S Offline
    sayezz
    wrote on last edited by
    #1

    i have a folder called "libs". This folder looks like:
    @
    libs
    |-A
    |- first.a
    |- first.so
    |- second.a
    |- second.so
    |-B
    |- third.a
    |- third.so
    |- fourth.a
    |- fourth.so
    @

    Is there a possibility to tell the .pro file to take all libs in the "libs"-folder?
    May i do something like this:
    @
    LIBS += -L /mypath/libs/* -l*
    @

    Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sayezz
      wrote on last edited by
      #2

      Got it:
      wrote a make function makro and added it to the .pro file
      Write this in your .pro file:
      @
      #without this variable qmake generats "" in the makefile e.g.: ..patsubst\ ./...
      MY_VARIABLE = patsubst
      LIBS += $($$MY_VARIABLE %.so,%,$(subst /path/to/libsfolder/lib, -l, $(wildcard /path/to/libsfolder/*.so)))
      @

      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