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. How to static compile when both the Dynamic Lib and static Lib are in the same path?
Forum Updated to NodeBB v4.3 + New Features

How to static compile when both the Dynamic Lib and static Lib are in the same path?

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

    I'm running into problem of static compiling when both the dynamic and static lib are in the same place.

    e.g. /usr/lib/libfoo.so and /usr/lib/libfoo.a

    I've tried in the PRO file
    CONFIG +=static
    DEFINES +=STATIC
    LIBS += -L/usr/lib -lfoo

    It builds, but not statically

    The only way to get it build statically is for me to remove /usr/lib/libfoo.so...however I want to avoid doing this

    I want to use a hard path but can't get it to work. I've tried the following:

    LIBS += -L/usr/lib/libfoo.a
    and
    LIBS+= -L/usr/lib -llibfoo.a
    and
    LIBS+=-L/usr/lib libfoo.a

    How do I specify a hard path to a static lib in the PRO file?

    TIA

    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