Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Cross-compiling Qt, link order .so & .a ?
Forum Updated to NodeBB v4.3 + New Features

Cross-compiling Qt, link order .so & .a ?

Scheduled Pinned Locked Moved C++ Gurus
4 Posts 3 Posters 2.9k 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.
  • D Offline
    D Offline
    dongdong
    wrote on last edited by
    #1

    Hi,

    cross-compiling Qt, I have a thridparty's .a file which changes some functions' implementation of a gcc library.

    for example
    libgcc_a.so is compiler's shared library, i have not libgcc_a.a.
    libmy_a.a is the file i want to use.

    I want to link libmy_a.a first than libgcc_a.so, if a function find in both file.

    Is it possible?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AlterX
      wrote on last edited by
      #2

      Yes...you can change the environment variable path for the lib and put your own before the standard one!

      Qt Ambassador
      Real-time cooperative teams: http://www.softairrealfight.net
      Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

      https://codereview.qt-project.org/...

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dongdong
        wrote on last edited by
        #3

        Thanks,
        but...which one?

        I add
        LIBS +=-Lpath_to_my_a_lib -lmy_a
        to projects.pro,
        seems not work.

        can you give me more info?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pacanek
          wrote on last edited by
          #4

          Maybe this helps.

          Add the library by path. You will be sure that it's the library you wanna use:
          LIBS += /somepath/libMyQtLib.so

          or try editing as AlterX probably suggested:
          LD_LIBRARY_PATH
          LD_RUNTIME_PATH

          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