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. Cannot find <library path>: Permission Denied
Forum Updated to NodeBB v4.3 + New Features

Cannot find <library path>: Permission Denied

Scheduled Pinned Locked Moved Unsolved General and Desktop
32 Posts 5 Posters 8.2k 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.
  • M Offline
    M Offline
    MrShawn
    wrote on last edited by
    #18

    Usually when linking libs in .pro files with the -l, I don't have good luck. To get it to work a lot of times I will link the lib file itself.

    Here is an example of what I mean.

    INCLUDEPATH += "$$PWD/vlc-qt/include"
    
    LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtQml.dll"
    LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtCore.dll"
    

    This will build but I have issues when I run. I usually have to copy the .dlls into the application's build directory (the same folder as the .exe file that is built).

    L 2 Replies Last reply
    0
    • M MrShawn

      Usually when linking libs in .pro files with the -l, I don't have good luck. To get it to work a lot of times I will link the lib file itself.

      Here is an example of what I mean.

      INCLUDEPATH += "$$PWD/vlc-qt/include"
      
      LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtQml.dll"
      LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtCore.dll"
      

      This will build but I have issues when I run. I usually have to copy the .dlls into the application's build directory (the same folder as the .exe file that is built).

      L Offline
      L Offline
      Laner107
      wrote on last edited by
      #19

      @JonB Its okay i thank you for the help!!

      @MrShawn I am quite new to the idea of building and using libraries, I notice there is an actuall folder for the libraries under mingw, I decided to store my one library im using in its own folder someone else, will this effect anything or should i keep it in mingw folder? And also where can i find the .dll files for my library i built as i can only find the .lib file and include folder?

      1 Reply Last reply
      0
      • M MrShawn

        Usually when linking libs in .pro files with the -l, I don't have good luck. To get it to work a lot of times I will link the lib file itself.

        Here is an example of what I mean.

        INCLUDEPATH += "$$PWD/vlc-qt/include"
        
        LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtQml.dll"
        LIBS += "$$PWD/vlc-qt/libs/mingw64/libVLCQtCore.dll"
        

        This will build but I have issues when I run. I usually have to copy the .dlls into the application's build directory (the same folder as the .exe file that is built).

        L Offline
        L Offline
        Laner107
        wrote on last edited by
        #20

        @MrShawn It also appear under my build settings that the build configuration is Debug and the make is a mingw32-make.exe, so does that mean my library is suppose to be a debug .lib that is also x32 instead of x64? This is all quite overwhelming and confusing and sorry if Im being a hassle.

        jsulmJ 1 Reply Last reply
        0
        • JonBJ JonB

          @Laner107
          As I said, I don't know this stuff, I'm only guessing. I'll have to leave it for others to help.

          My last quick test thought is: try recompiling your application sources (not the curl ones) with -DCURL_STATICLIB flag, and then relink. This may be nonsense or may make no difference. Worth a try. Then I'm afraid I'm bowing out.

          L Offline
          L Offline
          Laner107
          wrote on last edited by
          #21

          @JonB ALso where do i input the -DCURL_STATICLIB flag at? And do i need to download .dll files and put them into the mingw folder or since its a static library is it okay?

          1 Reply Last reply
          0
          • L Laner107

            @MrShawn It also appear under my build settings that the build configuration is Debug and the make is a mingw32-make.exe, so does that mean my library is suppose to be a debug .lib that is also x32 instead of x64? This is all quite overwhelming and confusing and sorry if Im being a hassle.

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

            @Laner107 said in Cannot find <library path>: Permission Denied:

            suppose to be a debug .lib that is also x32 instead of x64?

            It needs to be the same as your app. If you build your app for 32 bit then the lib must be 32bit, if you build for 64bit then the build must be 64bit. You can't mix. Also, if you build in release mode then use the lib build in release mode.

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

            L 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Laner107 said in Cannot find <library path>: Permission Denied:

              suppose to be a debug .lib that is also x32 instead of x64?

              It needs to be the same as your app. If you build your app for 32 bit then the lib must be 32bit, if you build for 64bit then the build must be 64bit. You can't mix. Also, if you build in release mode then use the lib build in release mode.

              L Offline
              L Offline
              Laner107
              wrote on last edited by
              #23

              @jsulm I actually ended up doing that now everything matches, but it says in documentation since im doing a static library i am suppose to put CURL_STATICLIB, i just cant find out where, here is the documentation.

              Building your own application with a static libcurl

              When building an application that uses the static libcurl library on Windows,
              you must define CURL_STATICLIB. Otherwise the linker will look for dynamic
              import symbols.

              jsulmJ 1 Reply Last reply
              0
              • L Laner107

                @jsulm I actually ended up doing that now everything matches, but it says in documentation since im doing a static library i am suppose to put CURL_STATICLIB, i just cant find out where, here is the documentation.

                Building your own application with a static libcurl

                When building an application that uses the static libcurl library on Windows,
                you must define CURL_STATICLIB. Otherwise the linker will look for dynamic
                import symbols.

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

                @Laner107 In your top pro file add:

                DEFINES += CURL_STATICLIB
                

                https://doc.qt.io/qt-5/qmake-language.html

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

                L 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Laner107 In your top pro file add:

                  DEFINES += CURL_STATICLIB
                  

                  https://doc.qt.io/qt-5/qmake-language.html

                  L Offline
                  L Offline
                  Laner107
                  wrote on last edited by
                  #25

                  @jsulm Now im getting 500+ errors from the ipv6-winssl folder and objects

                  jsulmJ 1 Reply Last reply
                  0
                  • L Laner107

                    @jsulm Now im getting 500+ errors from the ipv6-winssl folder and objects

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

                    @Laner107 Most probably some other libraries are missing

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

                    L 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Laner107 Most probably some other libraries are missing

                      L Offline
                      L Offline
                      Laner107
                      wrote on last edited by
                      #27

                      @jsulm Now it saying that qt5widgets.dll is missing, how do I fix this?

                      jsulmJ 1 Reply Last reply
                      0
                      • L Laner107

                        @jsulm Now it saying that qt5widgets.dll is missing, how do I fix this?

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

                        @Laner107 Is your Qt installation broken? How did you install Qt? Did you search for that dll in your qt installation already?

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

                        L 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Laner107 Is your Qt installation broken? How did you install Qt? Did you search for that dll in your qt installation already?

                          L Offline
                          L Offline
                          Laner107
                          wrote on last edited by
                          #29

                          @jsulm to fix it i literally had to copy all the .dll files in qt and paste them in the shadow build folder as well as all the plugins, do you know why i have to do this?

                          jsulmJ 1 Reply Last reply
                          0
                          • L Laner107

                            @jsulm to fix it i literally had to copy all the .dll files in qt and paste them in the shadow build folder as well as all the plugins, do you know why i have to do this?

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

                            @Laner107 What exactly was the problem actually?
                            You could not build or you could not start your app?

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

                            L 1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @Laner107 What exactly was the problem actually?
                              You could not build or you could not start your app?

                              L Offline
                              L Offline
                              Laner107
                              wrote on last edited by
                              #31

                              @jsulm I believe it was able to build but when i would start my app it would instantly crash, its now working though but like i said i had to had all the files to the shadow build.

                              jsulmJ 1 Reply Last reply
                              0
                              • L Laner107

                                @jsulm I believe it was able to build but when i would start my app it would instantly crash, its now working though but like i said i had to had all the files to the shadow build.

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

                                @Laner107 If you want to start your app outside of QtCreator you need to deploy it properly first.
                                See https://doc.qt.io/qt-5/windows-deployment.html

                                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