Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. cannot find library...
Forum Updated to NodeBB v4.3 + New Features

cannot find library...

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
22 Posts 4 Posters 7.1k 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.
  • A Anonymous_Banned275

    I am still try to grasp the relations of files in "subdir" project structure _ mainly project and its library..
    OK, my test project compiles, but linker cannot find the library... ( it does exist - I can see it in compiler otput...)
    What would be a logical way to find where is my "linking error"?
    I am looking for suggestions = like where to start ...

    00f815b5-f55e-4fde-8fc6-cc49faa5e961-image.png

    Axel SpoerlA Offline
    Axel SpoerlA Offline
    Axel Spoerl
    Moderators
    wrote on last edited by
    #2

    @AnneRanch

    • Please don't forget to mention, that this is related to Qt Creator. That's not only useful for those who are willing to help you. It also helps other users with similar problems (repeats from this post).

    • Type find /mnt/usb-Seagate [...]/BT__PROGRAMS -name libBT_Utility_Library.*
      Followed by the Enter Key.
      (Remark: Since I can't copy-paste from the attached screenshot, [...]means, you have to complete the path from the second last line in the screen shot).

    • post the output of the command above here - code-formatted please

    • post the path to UTILITY_DEBUG.pro

    • post your entire UTILITY_DEBUG.pro file here - code-formatted please

    Software Engineer
    The Qt Company, Oslo

    A 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • Axel SpoerlA Axel Spoerl

      @AnneRanch

      • Please don't forget to mention, that this is related to Qt Creator. That's not only useful for those who are willing to help you. It also helps other users with similar problems (repeats from this post).

      • Type find /mnt/usb-Seagate [...]/BT__PROGRAMS -name libBT_Utility_Library.*
        Followed by the Enter Key.
        (Remark: Since I can't copy-paste from the attached screenshot, [...]means, you have to complete the path from the second last line in the screen shot).

      • post the output of the command above here - code-formatted please

      • post the path to UTILITY_DEBUG.pro

      • post your entire UTILITY_DEBUG.pro file here - code-formatted please

      A Offline
      A Offline
      Anonymous_Banned275
      wrote on last edited by
      #3

      @Axel-Spoerl Update
      Here is my opinion what is the issue
      what is not the issue is - the shared library is being created and- the compiler shows it...

      The "normal way " to add shared library to subdir works ....I can add empty shared library to the subdir.
      What I am trying
      to do is to add existing project to subdir and SAME time change the TEMPLATE to lib. That is causing the linking problem...

      My next step will be to add empty shared library to subdir, add it to main subdir (executable) and try to verify its functions...

      Then I will try to figure out how to change the blank shared library and somehow copy the original existing project / object into it...

      I would appreciate if somebody would explain the purpose of DEFINES in "shared library" .pro file
      and what "creates" the contents of such DEFINES

      TEMPLATE = lib
      DEFINES += SUB_LIBRARY_LIBRARY

      Axel SpoerlA 1 Reply Last reply
      0
      • A Anonymous_Banned275

        @Axel-Spoerl Update
        Here is my opinion what is the issue
        what is not the issue is - the shared library is being created and- the compiler shows it...

        The "normal way " to add shared library to subdir works ....I can add empty shared library to the subdir.
        What I am trying
        to do is to add existing project to subdir and SAME time change the TEMPLATE to lib. That is causing the linking problem...

        My next step will be to add empty shared library to subdir, add it to main subdir (executable) and try to verify its functions...

        Then I will try to figure out how to change the blank shared library and somehow copy the original existing project / object into it...

        I would appreciate if somebody would explain the purpose of DEFINES in "shared library" .pro file
        and what "creates" the contents of such DEFINES

        TEMPLATE = lib
        DEFINES += SUB_LIBRARY_LIBRARY

        Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #4

        @AnneRanch
        All qmake variables are explained here.

        Software Engineer
        The Qt Company, Oslo

        A 1 Reply Last reply
        3
        • Axel SpoerlA Axel Spoerl

          @AnneRanch
          All qmake variables are explained here.

          A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #5

          @Axel-Spoerl OK - I guess I have to rephrase my post - what doe is do ?

          DEFINES

          qmake adds the values of this variable as compiler C preprocessor macros (-D option).

          For example:

          DEFINES += USE_MY_STUFF

          Axel SpoerlA 1 Reply Last reply
          0
          • A Anonymous_Banned275

            @Axel-Spoerl OK - I guess I have to rephrase my post - what doe is do ?

            DEFINES

            qmake adds the values of this variable as compiler C preprocessor macros (-D option).

            For example:

            DEFINES += USE_MY_STUFF

            Axel SpoerlA Offline
            Axel SpoerlA Offline
            Axel Spoerl
            Moderators
            wrote on last edited by
            #6

            @AnneRanch said in cannot find library...:

            what doe is do ?

            It does this:

            qmake adds the values of this variable as compiler C preprocessor macros (-D option).

            Example:
            If DEFINEScontains the strings "I", "like", "reading", "documentation", the arguments -DI -Dlike -Dreading -Ddocumentationwill be added to the compiler call. That is equivalent to adding this to the source code:

            #define I
            #define like
            #define reading
            #define documentation
            

            The University of Utah has a wonderful documentation of preprocessor macros.

            Software Engineer
            The Qt Company, Oslo

            A 1 Reply Last reply
            3
            • Axel SpoerlA Axel Spoerl

              @AnneRanch said in cannot find library...:

              what doe is do ?

              It does this:

              qmake adds the values of this variable as compiler C preprocessor macros (-D option).

              Example:
              If DEFINEScontains the strings "I", "like", "reading", "documentation", the arguments -DI -Dlike -Dreading -Ddocumentationwill be added to the compiler call. That is equivalent to adding this to the source code:

              #define I
              #define like
              #define reading
              #define documentation
              

              The University of Utah has a wonderful documentation of preprocessor macros.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #7

              @Axel-Spoerl PLEASE - can we get back to resolving the problem ?

              (
              apparently Qt use DEFINES to modify the usage of the library
              #if defined(TEST_LIBRARY_SUB_LIBRARY)

              define TEST_LIBRARY_SUB_EXPORT Q_DECL_EXPORT

              #else

              define TEST_LIBRARY_SUB_EXPORT Q_DECL_IMPORT

              #endif

              it looks as the "library" is "exported " - which is another item I do not get and I do not know if it is part of the "not finding " issue...

              Here is a full compile output - the library is created / build - it is the "include instructions " which must be wrong.

              Can some C++ guru help me to find the problem, PLEASE.

              11:02:04: Running steps for project TEST_SUBDIRS...
              11:02:04: Starting: "/usr/bin/make" clean -j4
              cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
              cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              rm -f moc_predefs.h
              rm -f test_library_sub.o
              rm -f *~ core *.core
              make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              rm -f moc_predefs.h
              rm -f moc_mainwindow.cpp
              rm -f ui_mainwindow.h
              rm -f main.o mainwindow.o moc_mainwindow.o
              rm -f *~ core *.core
              make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              11:02:04: The process "/usr/bin/make" exited normally.
              11:02:04: Starting: "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_SUBDIRS.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
              11:02:04: The process "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" exited normally.
              11:02:04: Starting: "/usr/bin/make" -f /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/Makefile qmake_all
              cd MAIN_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
              cd MAIN_SUB/ && /usr/bin/make -f Makefile qmake_all
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              make[1]: Nothing to be done for 'qmake_all'.
              make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              cd TEST_LIBRARY_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
              cd TEST_LIBRARY_SUB/ && /usr/bin/make -f Makefile qmake_all
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              make[1]: Nothing to be done for 'qmake_all'.
              make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              11:02:06: The process "/usr/bin/make" exited normally.
              11:02:06: Starting: "/usr/bin/make" -j4
              cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
              cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DTEST_LIBRARY_SUB_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../TEST_SUBDIRS/TEST_LIBRARY_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o test_library_sub.o ../../TEST_SUBDIRS/TEST_LIBRARY_SUB/test_library_sub.cpp
              make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              /home/nov25-1/Qt/5.15.2/gcc_64/bin/uic ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.ui -o ui_mainwindow.h
              clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o main.o ../../TEST_SUBDIRS/MAIN_SUB/main.cpp
              clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o mainwindow.o ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.cpp
              clang++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/features/data/dummy.cpp
              /home/nov25-1/Qt/5.15.2/gcc_64/bin/moc -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB/moc_predefs.h -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -I/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/llvm-14/lib/clang/14.0.0/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.h -o moc_mainwindow.cpp
              clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o moc_mainwindow.o moc_mainwindow.cpp
              rm -f libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so libTEST_LIBRARY_SUB.so.1 libTEST_LIBRARY_SUB.so.1.0
              clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -shared -Wl,-soname,libTEST_LIBRARY_SUB.so.1 -o libTEST_LIBRARY_SUB.so.1.0.0 test_library_sub.o  /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so **-lpthread    
              ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so
              ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1
              ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1.0
              make[1]: Leaving directory '/mnt/usb-**Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
              clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -o MAIN_SUB main.o mainwindow.o moc_mainwindow.o   /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread   
              make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
              11:02:14: The process "/usr/bin/make" exited normally.
              11:02:14: Elapsed time: 00:10.
              
              
              Axel SpoerlA JoeCFDJ 2 Replies Last reply
              0
              • A Anonymous_Banned275

                @Axel-Spoerl PLEASE - can we get back to resolving the problem ?

                (
                apparently Qt use DEFINES to modify the usage of the library
                #if defined(TEST_LIBRARY_SUB_LIBRARY)

                define TEST_LIBRARY_SUB_EXPORT Q_DECL_EXPORT

                #else

                define TEST_LIBRARY_SUB_EXPORT Q_DECL_IMPORT

                #endif

                it looks as the "library" is "exported " - which is another item I do not get and I do not know if it is part of the "not finding " issue...

                Here is a full compile output - the library is created / build - it is the "include instructions " which must be wrong.

                Can some C++ guru help me to find the problem, PLEASE.

                11:02:04: Running steps for project TEST_SUBDIRS...
                11:02:04: Starting: "/usr/bin/make" clean -j4
                cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
                cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                rm -f moc_predefs.h
                rm -f test_library_sub.o
                rm -f *~ core *.core
                make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                rm -f moc_predefs.h
                rm -f moc_mainwindow.cpp
                rm -f ui_mainwindow.h
                rm -f main.o mainwindow.o moc_mainwindow.o
                rm -f *~ core *.core
                make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                11:02:04: The process "/usr/bin/make" exited normally.
                11:02:04: Starting: "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_SUBDIRS.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                11:02:04: The process "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" exited normally.
                11:02:04: Starting: "/usr/bin/make" -f /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/Makefile qmake_all
                cd MAIN_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                cd MAIN_SUB/ && /usr/bin/make -f Makefile qmake_all
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                make[1]: Nothing to be done for 'qmake_all'.
                make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                cd TEST_LIBRARY_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                cd TEST_LIBRARY_SUB/ && /usr/bin/make -f Makefile qmake_all
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                make[1]: Nothing to be done for 'qmake_all'.
                make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                11:02:06: The process "/usr/bin/make" exited normally.
                11:02:06: Starting: "/usr/bin/make" -j4
                cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
                cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DTEST_LIBRARY_SUB_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../TEST_SUBDIRS/TEST_LIBRARY_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o test_library_sub.o ../../TEST_SUBDIRS/TEST_LIBRARY_SUB/test_library_sub.cpp
                make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                /home/nov25-1/Qt/5.15.2/gcc_64/bin/uic ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.ui -o ui_mainwindow.h
                clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o main.o ../../TEST_SUBDIRS/MAIN_SUB/main.cpp
                clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o mainwindow.o ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.cpp
                clang++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/features/data/dummy.cpp
                /home/nov25-1/Qt/5.15.2/gcc_64/bin/moc -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB/moc_predefs.h -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -I/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/llvm-14/lib/clang/14.0.0/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.h -o moc_mainwindow.cpp
                clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o moc_mainwindow.o moc_mainwindow.cpp
                rm -f libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so libTEST_LIBRARY_SUB.so.1 libTEST_LIBRARY_SUB.so.1.0
                clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -shared -Wl,-soname,libTEST_LIBRARY_SUB.so.1 -o libTEST_LIBRARY_SUB.so.1.0.0 test_library_sub.o  /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so **-lpthread    
                ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so
                ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1
                ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1.0
                make[1]: Leaving directory '/mnt/usb-**Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -o MAIN_SUB main.o mainwindow.o moc_mainwindow.o   /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread   
                make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                11:02:14: The process "/usr/bin/make" exited normally.
                11:02:14: Elapsed time: 00:10.
                
                
                Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #8

                @AnneRanch said in cannot find library...:

                PLEASE - can we get back to resolving the problem ?

                A good idea!
                We diverted, when you said:

                Here is my opinion what is the issue

                ...and started inquiring about qmakevariables:

                I would appreciate if somebody would explain the purpose of DEFINES in "shared library" .pro file
                and what "creates" the contents of such DEFINES

                It made sense to me, to answer your questions first. So let's get back to business :-)

                • Thanks for posting the compile output. That's helpful and shows that the libraries have been built, as you rightfully stated.
                • The question is, why your SUBDIRS projects don't find them.

                Can some C++ guru help

                It's certainly not a so much of a C++ issue: The compiler doesn't complain. It's the linker that, at a later point, doesn't find what the compiler has produced.

                Let's look at your SUBDIRS project structure, the .profiles involved and find the libraries in question. I have asked for some files in an earlier post. We got distracted by the variables. It would be helpful if you could reply to this post.

                Software Engineer
                The Qt Company, Oslo

                1 Reply Last reply
                2
                • A Anonymous_Banned275

                  @Axel-Spoerl PLEASE - can we get back to resolving the problem ?

                  (
                  apparently Qt use DEFINES to modify the usage of the library
                  #if defined(TEST_LIBRARY_SUB_LIBRARY)

                  define TEST_LIBRARY_SUB_EXPORT Q_DECL_EXPORT

                  #else

                  define TEST_LIBRARY_SUB_EXPORT Q_DECL_IMPORT

                  #endif

                  it looks as the "library" is "exported " - which is another item I do not get and I do not know if it is part of the "not finding " issue...

                  Here is a full compile output - the library is created / build - it is the "include instructions " which must be wrong.

                  Can some C++ guru help me to find the problem, PLEASE.

                  11:02:04: Running steps for project TEST_SUBDIRS...
                  11:02:04: Starting: "/usr/bin/make" clean -j4
                  cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
                  cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile clean
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  rm -f moc_predefs.h
                  rm -f test_library_sub.o
                  rm -f *~ core *.core
                  make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  rm -f moc_predefs.h
                  rm -f moc_mainwindow.cpp
                  rm -f ui_mainwindow.h
                  rm -f main.o mainwindow.o moc_mainwindow.o
                  rm -f *~ core *.core
                  make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  11:02:04: The process "/usr/bin/make" exited normally.
                  11:02:04: Starting: "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_SUBDIRS.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                  11:02:04: The process "/home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake" exited normally.
                  11:02:04: Starting: "/usr/bin/make" -f /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/Makefile qmake_all
                  cd MAIN_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                  cd MAIN_SUB/ && /usr/bin/make -f Makefile qmake_all
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  make[1]: Nothing to be done for 'qmake_all'.
                  make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  cd TEST_LIBRARY_SUB/ && /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug
                  cd TEST_LIBRARY_SUB/ && /usr/bin/make -f Makefile qmake_all
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  make[1]: Nothing to be done for 'qmake_all'.
                  make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  11:02:06: The process "/usr/bin/make" exited normally.
                  11:02:06: Starting: "/usr/bin/make" -j4
                  cd MAIN_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB/MAIN_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
                  cd TEST_LIBRARY_SUB/ && ( test -e Makefile || /home/nov25-1/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/TEST_LIBRARY_SUB/TEST_LIBRARY_SUB.pro -spec linux-clang CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DTEST_LIBRARY_SUB_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../TEST_SUBDIRS/TEST_LIBRARY_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o test_library_sub.o ../../TEST_SUBDIRS/TEST_LIBRARY_SUB/test_library_sub.cpp
                  make[1]: Entering directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  /home/nov25-1/Qt/5.15.2/gcc_64/bin/uic ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.ui -o ui_mainwindow.h
                  clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o main.o ../../TEST_SUBDIRS/MAIN_SUB/main.cpp
                  clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o mainwindow.o ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.cpp
                  clang++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/features/data/dummy.cpp
                  /home/nov25-1/Qt/5.15.2/gcc_64/bin/moc -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB/moc_predefs.h -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -I/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/TEST_SUBDIRS/MAIN_SUB -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/llvm-14/lib/clang/14.0.0/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../../TEST_SUBDIRS/MAIN_SUB/mainwindow.h -o moc_mainwindow.cpp
                  clang++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../TEST_SUBDIRS/MAIN_SUB -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/include -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtWidgets -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtGui -I/home/nov25-1/Qt/5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I. -I/home/nov25-1/Qt/5.15.2/gcc_64/mkspecs/linux-clang -o moc_mainwindow.o moc_mainwindow.cpp
                  rm -f libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so libTEST_LIBRARY_SUB.so.1 libTEST_LIBRARY_SUB.so.1.0
                  clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -shared -Wl,-soname,libTEST_LIBRARY_SUB.so.1 -o libTEST_LIBRARY_SUB.so.1.0.0 test_library_sub.o  /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so **-lpthread    
                  ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so
                  ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1
                  ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1.0
                  make[1]: Leaving directory '/mnt/usb-**Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB'
                  clang++ -ccc-gcc-name g++ -Wl,-rpath,/home/nov25-1/Qt/5.15.2/gcc_64/lib -o MAIN_SUB main.o mainwindow.o moc_mainwindow.o   /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/nov25-1/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread   
                  make[1]: Leaving directory '/mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/MAIN_SUB'
                  11:02:14: The process "/usr/bin/make" exited normally.
                  11:02:14: Elapsed time: 00:10.
                  
                  
                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #9

                  @AnneRanch said in cannot find library...:

                  This part is for Windows. You are building your app on Linux and can therefore ignore it.

                  #if defined(TEST_LIBRARY_SUB_LIBRARY)
                  define TEST_LIBRARY_SUB_EXPORT Q_DECL_EXPORT
                  
                  #else
                  define TEST_LIBRARY_SUB_EXPORT Q_DECL_IMPORT
                  
                  #endif
                  
                  1 Reply Last reply
                  1
                  • JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #10

                    In the original screen shot I see an error trying to load a shared library named libBT_Utility_LIbrary.so.1
                    In the successful make run I see it creates a library named libTEST_LIBRARY_SUB.so.1, so don't how this is related to the message.
                    Is this significant?

                    A 1 Reply Last reply
                    2
                    • JonBJ JonB

                      In the original screen shot I see an error trying to load a shared library named libBT_Utility_LIbrary.so.1
                      In the successful make run I see it creates a library named libTEST_LIBRARY_SUB.so.1, so don't how this is related to the message.
                      Is this significant?

                      A Offline
                      A Offline
                      Anonymous_Banned275
                      wrote on last edited by
                      #11

                      @JonB
                      Here is the latest
                      I have made an error "add library" (IDE option) SOURCE CODE by adding it as "internal" library

                      HOWEVER

                      when ADDED as "external library " (QT makes note it is NOT part of "regular build process ' (??)
                      I was lead to add .so file BUT such file was NOT located in project structure ( not part regular build process ??)
                      adding it as .so makes sense , however , QT build .so in ENTIRELY different folder !

                      and THAT is I BELIEVE CAUSED THE WHOLE ISSUE

                      HENCE
                      when the SOURCE is added AS INTERNAL LIBRARY , it builds fine <b>BUT the linker has no info where</b>,,,

                      JonBJ 1 Reply Last reply
                      0
                      • A Anonymous_Banned275

                        @JonB
                        Here is the latest
                        I have made an error "add library" (IDE option) SOURCE CODE by adding it as "internal" library

                        HOWEVER

                        when ADDED as "external library " (QT makes note it is NOT part of "regular build process ' (??)
                        I was lead to add .so file BUT such file was NOT located in project structure ( not part regular build process ??)
                        adding it as .so makes sense , however , QT build .so in ENTIRELY different folder !

                        and THAT is I BELIEVE CAUSED THE WHOLE ISSUE

                        HENCE
                        when the SOURCE is added AS INTERNAL LIBRARY , it builds fine <b>BUT the linker has no info where</b>,,,

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by JonB
                        #12

                        @AnneRanch
                        Although I have not used this, I would imagine that an internal library means that Qt looks for the source code in your project and compiles and links it, while external presumably means you already have the compiled library files quite outside of your project and just specify where it is for your project to link against.

                        If the .so files complained about in the error message do exist, whether externally or as a result of internal compilation, then it looks like they are in a path which is not looked in at runtime.

                        @Axel-Spoerl asked earlier for the content of your .pro file, presumably so he can understand what is going on. Are you able to post that (as literal text inside ``` Code tags so it's readable)?

                        A 1 Reply Last reply
                        3
                        • JonBJ JonB

                          @AnneRanch
                          Although I have not used this, I would imagine that an internal library means that Qt looks for the source code in your project and compiles and links it, while external presumably means you already have the compiled library files quite outside of your project and just specify where it is for your project to link against.

                          If the .so files complained about in the error message do exist, whether externally or as a result of internal compilation, then it looks like they are in a path which is not looked in at runtime.

                          @Axel-Spoerl asked earlier for the content of your .pro file, presumably so he can understand what is going on. Are you able to post that (as literal text inside ``` Code tags so it's readable)?

                          A Offline
                          A Offline
                          Anonymous_Banned275
                          wrote on last edited by Anonymous_Banned275
                          #13

                          I wound like to continue this thread to point out some of the difficulty adding a library to sudir.

                          As requested ,, here is a copy of .pro AFTER " Add library.. ' option. The code complies and runs.

                          unix:!macx: LIBS += -L$$PWD/../BT_Utility_Library/ -lBT_Utility_Library

                          INCLUDEPATH += $$PWD/../BT_Utility_Library
                          DEPENDPATH += $$PWD/../BT_Utility_Library

                          unix:!macx: LIBS += -L$$OUT_PWD/../BT_Utility_Library/ -lBT_Utility_Library

                          INCLUDEPATH += $$PWD/../BT_Utility_Library
                          DEPENDPATH += $$PWD/../BT_Utility_Library

                          unix:!macx: LIBS += -L$$OUT_PWD/../Bluetoothctl_Dialog/ -lBluetoothctl_Dialog

                          INCLUDEPATH += $$PWD/../Bluetoothctl_Dialog
                          DEPENDPATH += $$PWD/../Bluetoothctl_Dialog

                          It seems (works) that the library has to be added as "internal " - as the option is clearly given in "add library " dialog.

                          9f135075-4be9-4101-9a78-d112907c19c0-image.png

                          Then "compiled" and BEFORE run added AGAIN as external library - ".so " and recompiled and then it will link and run...

                          The first "compile" builds the .so in different folder-
                          AND it actually build a folder with " debug" in the name - it brings up a question

                          WHAT is this ",,,, debug " folder ?
                          What does it do ?

                          It is clearly NOT given as option in Linux !

                          Second subject for discussion
                          it is really nice QT GUI "build / create /compile" hides the actual compiler / linker options , BUT
                          it would be nice to have an option to show all these "low level " options . I assume there is some kind of configuration file which contains the "low level " commands.

                          A 1 Reply Last reply
                          0
                          • A Anonymous_Banned275

                            I wound like to continue this thread to point out some of the difficulty adding a library to sudir.

                            As requested ,, here is a copy of .pro AFTER " Add library.. ' option. The code complies and runs.

                            unix:!macx: LIBS += -L$$PWD/../BT_Utility_Library/ -lBT_Utility_Library

                            INCLUDEPATH += $$PWD/../BT_Utility_Library
                            DEPENDPATH += $$PWD/../BT_Utility_Library

                            unix:!macx: LIBS += -L$$OUT_PWD/../BT_Utility_Library/ -lBT_Utility_Library

                            INCLUDEPATH += $$PWD/../BT_Utility_Library
                            DEPENDPATH += $$PWD/../BT_Utility_Library

                            unix:!macx: LIBS += -L$$OUT_PWD/../Bluetoothctl_Dialog/ -lBluetoothctl_Dialog

                            INCLUDEPATH += $$PWD/../Bluetoothctl_Dialog
                            DEPENDPATH += $$PWD/../Bluetoothctl_Dialog

                            It seems (works) that the library has to be added as "internal " - as the option is clearly given in "add library " dialog.

                            9f135075-4be9-4101-9a78-d112907c19c0-image.png

                            Then "compiled" and BEFORE run added AGAIN as external library - ".so " and recompiled and then it will link and run...

                            The first "compile" builds the .so in different folder-
                            AND it actually build a folder with " debug" in the name - it brings up a question

                            WHAT is this ",,,, debug " folder ?
                            What does it do ?

                            It is clearly NOT given as option in Linux !

                            Second subject for discussion
                            it is really nice QT GUI "build / create /compile" hides the actual compiler / linker options , BUT
                            it would be nice to have an option to show all these "low level " options . I assume there is some kind of configuration file which contains the "low level " commands.

                            A Offline
                            A Offline
                            Anonymous_Banned275
                            wrote on last edited by
                            #14

                            @AnneRanch Here is an example of "...debug" folder / directory created by compiler :

                            d4bca327-3236-464f-bd10-d30b6666fe95-image.png

                            That basically stops the linker from finding the .so library.

                            This is just an example...

                            Axel SpoerlA 1 Reply Last reply
                            0
                            • A Anonymous_Banned275

                              @AnneRanch Here is an example of "...debug" folder / directory created by compiler :

                              d4bca327-3236-464f-bd10-d30b6666fe95-image.png

                              That basically stops the linker from finding the .so library.

                              This is just an example...

                              Axel SpoerlA Offline
                              Axel SpoerlA Offline
                              Axel Spoerl
                              Moderators
                              wrote on last edited by
                              #15

                              @AnneRanch
                              I am sure, we can solve your problem if you post all of what I asked you here. Is there a specific reason, why you ignore that request?

                              Software Engineer
                              The Qt Company, Oslo

                              A 1 Reply Last reply
                              0
                              • Axel SpoerlA Axel Spoerl

                                @AnneRanch
                                I am sure, we can solve your problem if you post all of what I asked you here. Is there a specific reason, why you ignore that request?

                                A Offline
                                A Offline
                                Anonymous_Banned275
                                wrote on last edited by
                                #16

                                @Axel-Spoerl Yes, apparently you cannot participate in discussion and include what others have posted...
                                the .pro path has nothing to do with the issue
                                the compiler output shows WHERE the .so files are
                                hence location of .so files is already known
                                the compiler DOES not posts #include errors
                                ( the path for #include is not an issue )
                                The issue is
                                why using internal file option creates/ builds the .so files (good) in new , QT created location (BAD ) .

                                Somebody mentioned that " windows debug ..." option does not apply in Linux BUT it sure looks as some other (IDE unknown ) option is creating NEW folder which surprisingly contains "debug" in name ,,,
                                Lets work on this together and try to go forward with what we know... Cheers

                                Axel SpoerlA 1 Reply Last reply
                                0
                                • A Anonymous_Banned275

                                  @Axel-Spoerl Yes, apparently you cannot participate in discussion and include what others have posted...
                                  the .pro path has nothing to do with the issue
                                  the compiler output shows WHERE the .so files are
                                  hence location of .so files is already known
                                  the compiler DOES not posts #include errors
                                  ( the path for #include is not an issue )
                                  The issue is
                                  why using internal file option creates/ builds the .so files (good) in new , QT created location (BAD ) .

                                  Somebody mentioned that " windows debug ..." option does not apply in Linux BUT it sure looks as some other (IDE unknown ) option is creating NEW folder which surprisingly contains "debug" in name ,,,
                                  Lets work on this together and try to go forward with what we know... Cheers

                                  Axel SpoerlA Offline
                                  Axel SpoerlA Offline
                                  Axel Spoerl
                                  Moderators
                                  wrote on last edited by Axel Spoerl
                                  #17

                                  Here is what we know:
                                  The compiler creates library A:
                                  libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so
                                  in /mnt/usb-**Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB

                                  I creates two symlinks to the library:

                                  ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1
                                  ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1.0
                                  

                                  We also know, that the linker is instructed to find library B: libBT_Utility.so.1
                                  in /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/UTILITY_DEBUG/untitled/untitled

                                  These are two different libraries in two different paths.
                                  In the part that you have elected to share with us, the linker can't find library A.
                                  In the other part you have elected to share with us, the compiler successfully produces library B.
                                  Two separate things, completely unrelated.
                                  @JonB has already pointed at this discrepancy.

                                  On a side note:
                                  The first path contains two asterisks between usb-and Seagate, which is a potential error source.

                                  What you know, but we don’t:

                                  • The very specific linker instruction makes me believe, that library B may actually exist. Maybe it's created in another compile step. If it was my problem on my computer, I'd search for the library on the file system.

                                  • The linker instruction must be in one (or more) of your .profiles. If it was my problem on my computer, I'd inspect them and share them with an expert.

                                  Lets work on this together and try to go forward with what we know.

                                  Sometimes we are baffled with a problem, that is not rooted where we firmly believe it is. Then we need the help of others to look into places, where we haven't looked before - because we were biased by our opinion to look only where we expect the issue to reside. If I may be frank: It is kind of a pattern in your posts, that you refuse requests to shed light to unexpected corners. Some of them might seem overly formal. Some of them might turn out to be useless. They all have one single intention: Understand a problem and solve it.

                                  @AnneRanch said in cannot find library...:

                                  Yes, apparently you cannot participate in discussion and include what others have posted...

                                  Breathe. Smile :-)

                                  Software Engineer
                                  The Qt Company, Oslo

                                  A 1 Reply Last reply
                                  3
                                  • Axel SpoerlA Axel Spoerl

                                    Here is what we know:
                                    The compiler creates library A:
                                    libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so
                                    in /mnt/usb-**Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/build-TEST_SUBDIRS-Qt_5_15_2_gcc_64-Debug/TEST_LIBRARY_SUB

                                    I creates two symlinks to the library:

                                    ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1
                                    ln -s libTEST_LIBRARY_SUB.so.1.0.0 libTEST_LIBRARY_SUB.so.1.0
                                    

                                    We also know, that the linker is instructed to find library B: libBT_Utility.so.1
                                    in /mnt/usb-Seagate_Expansion_NA833BDC-0:0-part4/BT__PROGRAMS/UTILITY_DEBUG/untitled/untitled

                                    These are two different libraries in two different paths.
                                    In the part that you have elected to share with us, the linker can't find library A.
                                    In the other part you have elected to share with us, the compiler successfully produces library B.
                                    Two separate things, completely unrelated.
                                    @JonB has already pointed at this discrepancy.

                                    On a side note:
                                    The first path contains two asterisks between usb-and Seagate, which is a potential error source.

                                    What you know, but we don’t:

                                    • The very specific linker instruction makes me believe, that library B may actually exist. Maybe it's created in another compile step. If it was my problem on my computer, I'd search for the library on the file system.

                                    • The linker instruction must be in one (or more) of your .profiles. If it was my problem on my computer, I'd inspect them and share them with an expert.

                                    Lets work on this together and try to go forward with what we know.

                                    Sometimes we are baffled with a problem, that is not rooted where we firmly believe it is. Then we need the help of others to look into places, where we haven't looked before - because we were biased by our opinion to look only where we expect the issue to reside. If I may be frank: It is kind of a pattern in your posts, that you refuse requests to shed light to unexpected corners. Some of them might seem overly formal. Some of them might turn out to be useless. They all have one single intention: Understand a problem and solve it.

                                    @AnneRanch said in cannot find library...:

                                    Yes, apparently you cannot participate in discussion and include what others have posted...

                                    Breathe. Smile :-)

                                    A Offline
                                    A Offline
                                    Anonymous_Banned275
                                    wrote on last edited by
                                    #18

                                    @Axel-Spoerl Thanks, nice summary what was already discussed ..
                                    The ** is part of this posting software BOLD HIGHLIGHT, sorry ...

                                    Here is working result of adding libraries to one .pro of the subpro structure -
                                    NONE of them have "debug" added.

                                    It is pretty useless without knowing the absolute path to the main subproject .pro

                                    INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                    DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                    
                                    unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/BT_Utility_Library/ -lBT_Utility_Library
                                    
                                    INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                    DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                    
                                    unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/Bluetoothctl_Dialog/ -lBluetoothctl_Dialog
                                    
                                    INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                    DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                    
                                    unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY/ -lBT_MS_LIBRARY
                                    
                                    INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                    DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                    
                                    
                                    A Axel SpoerlA 2 Replies Last reply
                                    0
                                    • A Anonymous_Banned275

                                      @Axel-Spoerl Thanks, nice summary what was already discussed ..
                                      The ** is part of this posting software BOLD HIGHLIGHT, sorry ...

                                      Here is working result of adding libraries to one .pro of the subpro structure -
                                      NONE of them have "debug" added.

                                      It is pretty useless without knowing the absolute path to the main subproject .pro

                                      INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                      DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                      
                                      unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/BT_Utility_Library/ -lBT_Utility_Library
                                      
                                      INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                      DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                      
                                      unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/Bluetoothctl_Dialog/ -lBluetoothctl_Dialog
                                      
                                      INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                      DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                      
                                      unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY/ -lBT_MS_LIBRARY
                                      
                                      INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                      DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                      
                                      
                                      A Offline
                                      A Offline
                                      Anonymous_Banned275
                                      wrote on last edited by
                                      #19

                                      @AnneRanch Just for info
                                      if I add
                                      "internal" library with both "Linux" and "windows " options - it add this to .pro

                                      win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/BT_LIBRARY/BT_Utility_Library/release/ -lBT_Utility_Library
                                      else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/BT_LIBRARY/BT_Utility_Library/debug/ -lBT_Utility_Library
                                      else:unix:!macx: LIBS += -L$$OUT_PWD/BT_LIBRARY/BT_Utility_Library/ -lBT_Utility_Library
                                      
                                      **this  is also added - Linux add** 
                                      
                                      INCLUDEPATH += $$PWD/BT_LIBRARY/BT_Utility_Library
                                      DEPENDPATH += $$PWD/BT_LIBRARY/BT_Utility_Library
                                      
                                      

                                      add I get this "else" error when "build" HENCE I CANNOT Accidentally use "windows" options , not without consequence...

                                      0ff29302-f7d9-4780-b241-91ee1da76a60-image.png

                                      1 Reply Last reply
                                      0
                                      • A Anonymous_Banned275

                                        @Axel-Spoerl Thanks, nice summary what was already discussed ..
                                        The ** is part of this posting software BOLD HIGHLIGHT, sorry ...

                                        Here is working result of adding libraries to one .pro of the subpro structure -
                                        NONE of them have "debug" added.

                                        It is pretty useless without knowing the absolute path to the main subproject .pro

                                        INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                        DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/BT_Utility_Library
                                        
                                        unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/BT_Utility_Library/ -lBT_Utility_Library
                                        
                                        INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                        DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1_LIBRARY/BT_LIBRARY/Bluetoothctl_Dialog
                                        
                                        unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/build-BT_FT857_CAT_DEV13_V1-Qt_5_15_2_gcc_64-Debug/BT_LIBRARY/Bluetoothctl_Dialog/ -lBluetoothctl_Dialog
                                        
                                        INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                        DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_LIBRARY/Bluetoothctl_Dialog
                                        
                                        unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY/ -lBT_MS_LIBRARY
                                        
                                        INCLUDEPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                        DEPENDPATH += $$PWD/../../../../../../../../mnt/A_BT_DEC10/BT__PROGRAMS/BT_FT857_CAT_DEV13_V1/BT_MS_LIBRARY
                                        
                                        
                                        Axel SpoerlA Offline
                                        Axel SpoerlA Offline
                                        Axel Spoerl
                                        Moderators
                                        wrote on last edited by
                                        #20

                                        @AnneRanch said in cannot find library...:

                                        It is pretty useless

                                        Yes. Because you posted the wrong file.
                                        We need the .pro file containing libBT_Utility.so.1 in a line starting with LIBS +=

                                        Have you located libBT_Utility.so.1 in your file system?

                                        Software Engineer
                                        The Qt Company, Oslo

                                        A 1 Reply Last reply
                                        0
                                        • Axel SpoerlA Axel Spoerl referenced this topic on
                                        • Axel SpoerlA Axel Spoerl

                                          @AnneRanch said in cannot find library...:

                                          It is pretty useless

                                          Yes. Because you posted the wrong file.
                                          We need the .pro file containing libBT_Utility.so.1 in a line starting with LIBS +=

                                          Have you located libBT_Utility.so.1 in your file system?

                                          A Offline
                                          A Offline
                                          Anonymous_Banned275
                                          wrote on last edited by
                                          #21

                                          @Axel-Spoerl Sorry . I got involved in another issue.

                                          There is no .so info when "add library" is used
                                          HERE
                                          ( I believe INCLUDEPATH can be printed but I forgot how )

                                          unix:!macx: LIBS += -L$$OUT_PWD/../MS_BASE_CLASS/ -lMS_BASE_CLASS

                                          INCLUDEPATH += $$PWD/../MS_BASE_CLASS
                                          DEPENDPATH += $$PWD/../MS_BASE_CLASS

                                          Yes. Because you posted the wrong file.
                                          We need the .pro file containing libBT_Utility.so.1 in a line starting with LIBS +=

                                          Have you located libBT_Utility.so.1 in your file system?

                                          Axel SpoerlA 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