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 can i import LIBS

How can i import LIBS

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

    HI,

    I am using SDK's library (#include "libsoc_gpio.h")

    And I also added theese to the .pro file;

    QMAKE_CXXFLAGS += -lpthread
    LIBS +=-lpthread

    LIBS += -llibsoc_gpio

    But when i compile the code it's gives theese errors;

    1-) :-1: error: collect2: error: ld returned 1 exit status
    2-) :-1: error: [Makefile:653: LCD-SubMenus] Error 1

    NOTE: library path: /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include

    How can i use this?

    Best regards.

    KroMignonK 1 Reply Last reply
    0
    • YaldizY Yaldiz

      HI,

      I am using SDK's library (#include "libsoc_gpio.h")

      And I also added theese to the .pro file;

      QMAKE_CXXFLAGS += -lpthread
      LIBS +=-lpthread

      LIBS += -llibsoc_gpio

      But when i compile the code it's gives theese errors;

      1-) :-1: error: collect2: error: ld returned 1 exit status
      2-) :-1: error: [Makefile:653: LCD-SubMenus] Error 1

      NOTE: library path: /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include

      How can i use this?

      Best regards.

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @Yaldiz AFAIK, for Linux system, you should remove "lib" for the library name.
      You can specify library path with -L

      To summarize the correct way should be:

      LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lsoc_gpio
      

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      1
      • YaldizY Offline
        YaldizY Offline
        Yaldiz
        wrote on last edited by
        #3

        I tried for sqlite like below and it's works fine;

        LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lsqlite3

        but when i try for libsoc_gpio it's gives same error.
        I think there is another problem. What could be this problem?

        KroMignonK 1 Reply Last reply
        0
        • YaldizY Yaldiz

          I tried for sqlite like below and it's works fine;

          LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lsqlite3

          but when i try for libsoc_gpio it's gives same error.
          I think there is another problem. What could be this problem?

          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by
          #4

          @Yaldiz said in How can i import LIBS:

          /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include

          Are you really sure /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include contains the library file libsoc_gpio.so?

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          0
          • YaldizY Offline
            YaldizY Offline
            Yaldiz
            wrote on last edited by
            #5

            Yes, exist libsoc_gpio.h

            huseyin@X-X:/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include$ ls libsoc
            libsoc_board.h libsoc_debug.h libsoc_i2c.h libsoc_pwm.h
            libsoc_conffile.h libsoc_gpio.h libsocketcan.h libsoc_spi.h

            KroMignonK 1 Reply Last reply
            0
            • YaldizY Yaldiz

              Yes, exist libsoc_gpio.h

              huseyin@X-X:/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include$ ls libsoc
              libsoc_board.h libsoc_debug.h libsoc_i2c.h libsoc_pwm.h
              libsoc_conffile.h libsoc_gpio.h libsocketcan.h libsoc_spi.h

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by KroMignon
              #6

              @Yaldiz said in How can i import LIBS:

              Yes, exist libsoc_gpio.h

              This is the header file not the library which you want to link with.
              The library will have .so (for dynamic library) or .a (for static library) as extension.

              try this to find its location: find opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/ -name libsoc_gpio.*

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              1 Reply Last reply
              0
              • YaldizY Offline
                YaldizY Offline
                Yaldiz
                wrote on last edited by
                #7

                @KroMignon said in How can i import LIBS:

                libsoc_gpio.so

                No .so or .a file.

                KroMignonK 1 Reply Last reply
                0
                • YaldizY Yaldiz

                  @KroMignon said in How can i import LIBS:

                  libsoc_gpio.so

                  No .so or .a file.

                  KroMignonK Offline
                  KroMignonK Offline
                  KroMignon
                  wrote on last edited by
                  #8

                  @Yaldiz said in How can i import LIBS:

                  No .so or .a file.

                  Did you try the search it with:
                  find /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/ -name libsoc_gpio.*
                  or
                  find /opt/tdx-xwayland/5.6.0/sysroots/ -name libsoc_gpio.*

                  It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                  1 Reply Last reply
                  0
                  • YaldizY Offline
                    YaldizY Offline
                    Yaldiz
                    wrote on last edited by
                    #9

                    I tried 2 option, the .so or .a file does not exist.

                    KroMignonK 1 Reply Last reply
                    0
                    • YaldizY Yaldiz

                      I tried 2 option, the .so or .a file does not exist.

                      KroMignonK Offline
                      KroMignonK Offline
                      KroMignon
                      wrote on last edited by KroMignon
                      #10

                      @Yaldiz said in How can i import LIBS:

                      I tried 2 option, the .so or .a file does not exist.

                      How do you want to use a library which you don't have?
                      Check this with your SDK provider.

                      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                      1 Reply Last reply
                      1
                      • YaldizY Offline
                        YaldizY Offline
                        Yaldiz
                        wrote on last edited by
                        #11

                        Thank you very much for your time and help, I will ask my SDK provider.

                        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