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. g++ static library dependency chain
Forum Updated to NodeBB v4.3 + New Features

g++ static library dependency chain

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

    Hi!

    Suppose I created a static library libX.a , which is in directory some_path.

    Now I want to create another static library libY.a at the same directory, and I want to "link" libX.a into libY.a, i.e., all the symbols in libX.a to be somehow copied into libY.a. This way, when I link libY.a to a program Z, I do not need to link libX.a to Z too.

    I know I could ar every single symbol of libX.a into libY.a, but I would like to refer to libX.a, and not to its symbols directly.

    Does anyone know how to do it using g++?

    Thanks

    jsulmJ 1 Reply Last reply
    0
    • canellasC canellas

      Hi!

      Suppose I created a static library libX.a , which is in directory some_path.

      Now I want to create another static library libY.a at the same directory, and I want to "link" libX.a into libY.a, i.e., all the symbols in libX.a to be somehow copied into libY.a. This way, when I link libY.a to a program Z, I do not need to link libX.a to Z too.

      I know I could ar every single symbol of libX.a into libY.a, but I would like to refer to libX.a, and not to its symbols directly.

      Does anyone know how to do it using g++?

      Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @canellas Why do you want to do this? In any case you will need to link your application against both static libraries, so what is the advantage of "copying" symbols from one to another?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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