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. library not found for -lcomponents

library not found for -lcomponents

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 477 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.
  • privatepepperP Offline
    privatepepperP Offline
    privatepepper
    wrote on last edited by privatepepper
    #1

    Hello,

    So, I tried to add qt-material-widgets to my project. In the beginning, everything worked fine, but when I restarted my laptop I got these errors:

    error: library not found for -lcomponents
    error: linker command failed with exit code 1 (use -v to see invocation)
    

    How I add these qt-material-widgets to my project:

    1. I downloaded files from the qt-material-widgets github
    2. I builder the qt-material-widgets.pro file
    3. Then I added components file and libcomponents.a file (from build-qt-material-widgets- file) to my project:

    Screenshot 2020-05-27 at 23.00.15.png

    1. And my last step was:
    INCLUDEPATH += components/
    LIBS += -L$$PWD/./ -lcomponents
    

    What did I do wrong?

    By the way, if i reinstall the qt-material-widgets and re-do these steps everything works fine, but if i turn off my laptop and then turn it back on, I am getting these errors again.

    jsulmJ 1 Reply Last reply
    0
    • privatepepperP privatepepper

      Hello,

      So, I tried to add qt-material-widgets to my project. In the beginning, everything worked fine, but when I restarted my laptop I got these errors:

      error: library not found for -lcomponents
      error: linker command failed with exit code 1 (use -v to see invocation)
      

      How I add these qt-material-widgets to my project:

      1. I downloaded files from the qt-material-widgets github
      2. I builder the qt-material-widgets.pro file
      3. Then I added components file and libcomponents.a file (from build-qt-material-widgets- file) to my project:

      Screenshot 2020-05-27 at 23.00.15.png

      1. And my last step was:
      INCLUDEPATH += components/
      LIBS += -L$$PWD/./ -lcomponents
      

      What did I do wrong?

      By the way, if i reinstall the qt-material-widgets and re-do these steps everything works fine, but if i turn off my laptop and then turn it back on, I am getting these errors again.

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

      @privatepepper Since it's a static lib:

      LIBS += $$PWD/libcomponents.a
      

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

      privatepepperP 1 Reply Last reply
      0
      • jsulmJ jsulm

        @privatepepper Since it's a static lib:

        LIBS += $$PWD/libcomponents.a
        
        privatepepperP Offline
        privatepepperP Offline
        privatepepper
        wrote on last edited by
        #3

        @jsulm

        Thanks for the help, I changed my code to:

        LIBS += $$PWD/libcomponents.a
        

        And now I am getting a new error:

        error: no such file or directory: '/Users/L/Documents/C++/Projects/Sorting-Algorithms/Sorting_Algorithms/libcomponents.a/'
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          From your picture, that file was not downloaded (see the cloud icon). Where exactly is it stored ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          privatepepperP 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            From your picture, that file was not downloaded (see the cloud icon). Where exactly is it stored ?

            privatepepperP Offline
            privatepepperP Offline
            privatepepper
            wrote on last edited by privatepepper
            #5

            @SGaist

            Ohhh..., I clicked on cloud icon and downloaded that file, and my project started working, thank you:)

            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