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 to fix " Missing argument to '-L' " error ?

how to fix " Missing argument to '-L' " error ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
33 Posts 4 Posters 11.7k 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.
  • AhtiA Offline
    AhtiA Offline
    Ahti
    wrote on last edited by
    #7

    After doing what @Eddy said the app started to work :)

    what is a signature ?? Lol

    EddyE 1 Reply Last reply
    1
    • AhtiA Ahti

      After doing what @Eddy said the app started to work :)

      EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #8

      @Ahti

      Good deal!

      Qt Certified Specialist
      www.edalsolutions.be

      AhtiA 1 Reply Last reply
      1
      • EddyE Eddy

        @Ahti

        Good deal!

        AhtiA Offline
        AhtiA Offline
        Ahti
        wrote on last edited by Ahti
        #9

        @Eddy lol it still gives those 3 errors :(

        what is a signature ?? Lol

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by Eddy
          #10

          Good to see it's funny to you ;-)

          Can you edit the link to you image or just copy the text here? We cannot see the image in your previous post.
          You can use an image provider to show it to us by following this topic
          There is still a problem with the uploading of image in the Qt forum. The admins are working on it though.

          Edit : did you check the hint from @koahnig ?

          Qt Certified Specialist
          www.edalsolutions.be

          AhtiA 1 Reply Last reply
          1
          • EddyE Eddy

            Good to see it's funny to you ;-)

            Can you edit the link to you image or just copy the text here? We cannot see the image in your previous post.
            You can use an image provider to show it to us by following this topic
            There is still a problem with the uploading of image in the Qt forum. The admins are working on it though.

            Edit : did you check the hint from @koahnig ?

            AhtiA Offline
            AhtiA Offline
            Ahti
            wrote on last edited by Ahti
            #11

            @Eddy see i edited the post

            changing from && to $$ ? yes i did that but now i am gettings those errors

            note the problem is with those Dll files i know it because when i delete them and run my project it works.

            what is a signature ?? Lol

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #12

              why do you have those 2 lines?

              win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
              win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
              

              Is one of them not enough?
              The Dll path seems redundant since you don't use it further on

              Qt Certified Specialist
              www.edalsolutions.be

              AhtiA 1 Reply Last reply
              0
              • EddyE Eddy

                why do you have those 2 lines?

                win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
                

                Is one of them not enough?
                The Dll path seems redundant since you don't use it further on

                AhtiA Offline
                AhtiA Offline
                Ahti
                wrote on last edited by Ahti
                #13

                @Eddy

                Okay removed everything except :

                win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                

                but still getting those 3 errors

                I use that Dll file for getting some windows functions that i need in my project.
                functions like :
                GetDesktopWindow();
                MonitorFromWIndow();
                GetCurrentBrightness();
                etc

                what is a signature ?? Lol

                K 1 Reply Last reply
                0
                • EddyE Offline
                  EddyE Offline
                  Eddy
                  wrote on last edited by
                  #14

                  what is in your $$PWD/Dll/ folder?

                  Qt Certified Specialist
                  www.edalsolutions.be

                  AhtiA 1 Reply Last reply
                  1
                  • AhtiA Ahti

                    @Eddy

                    Okay removed everything except :

                    win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                    

                    but still getting those 3 errors

                    I use that Dll file for getting some windows functions that i need in my project.
                    functions like :
                    GetDesktopWindow();
                    MonitorFromWIndow();
                    GetCurrentBrightness();
                    etc

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #15

                    @Ahti said in how to fix " Missing argument to '-L' " error ?:

                    @Eddy

                    Okay removed everything except :

                    win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                    

                    but still getting those 3 errors

                    I use that Dll file for getting some windows functions that i need in my project.
                    functions like :
                    GetDesktopWindow();
                    MonitorFromWIndow();
                    GetCurrentBrightness();
                    etc

                    The problem ist that this is only working for release. Therefore, you need to be sure that you are in release mode.
                    Also sometimes it is good to rerun qmake and possibly rebuild your libraries.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    1
                    • EddyE Eddy

                      what is in your $$PWD/Dll/ folder?

                      AhtiA Offline
                      AhtiA Offline
                      Ahti
                      wrote on last edited by
                      #16

                      @Eddy

                      3 windows dll files

                      dxva2.dll, dxva264.dll and user32.dll

                      what is a signature ?? Lol

                      K 1 Reply Last reply
                      0
                      • AhtiA Ahti

                        @Eddy

                        3 windows dll files

                        dxva2.dll, dxva264.dll and user32.dll

                        K Offline
                        K Offline
                        koahnig
                        wrote on last edited by
                        #17

                        @Ahti said in how to fix " Missing argument to '-L' " error ?:

                        @Eddy

                        3 windows dll files

                        dxva2.dll, dxva264.dll and user32.dll

                        no libs with those file names?
                        The dlls are used during run time, but while linking you need to have the libs created together with the dlls there.

                        Vote the answer(s) that helped you to solve your issue(s)

                        AhtiA 1 Reply Last reply
                        0
                        • K koahnig

                          @Ahti said in how to fix " Missing argument to '-L' " error ?:

                          @Eddy

                          3 windows dll files

                          dxva2.dll, dxva264.dll and user32.dll

                          no libs with those file names?
                          The dlls are used during run time, but while linking you need to have the libs created together with the dlls there.

                          AhtiA Offline
                          AhtiA Offline
                          Ahti
                          wrote on last edited by
                          #18

                          @koahnig

                          now i got the libs but still getting that error :(

                          what is a signature ?? Lol

                          K 1 Reply Last reply
                          0
                          • AhtiA Ahti

                            @koahnig

                            now i got the libs but still getting that error :(

                            K Offline
                            K Offline
                            koahnig
                            wrote on last edited by
                            #19

                            @Ahti said in how to fix " Missing argument to '-L' " error ?:

                            @koahnig

                            now i got the libs but still getting that error :(

                            What is the actual error message with your current configuration?
                            Probably it would be good also to post the current .pro file.

                            Vote the answer(s) that helped you to solve your issue(s)

                            AhtiA 1 Reply Last reply
                            0
                            • K koahnig

                              @Ahti said in how to fix " Missing argument to '-L' " error ?:

                              @koahnig

                              now i got the libs but still getting that error :(

                              What is the actual error message with your current configuration?
                              Probably it would be good also to post the current .pro file.

                              AhtiA Offline
                              AhtiA Offline
                              Ahti
                              wrote on last edited by
                              #20

                              @koahnig

                              those three errors that i already mentioned.

                              my new pro file:

                              #-------------------------------------------------
                              #
                              # Project created by Ahtisham 2016-08-16T13:18:59
                              #
                              #-------------------------------------------------
                              
                              QT       += core gui
                              
                              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                              
                              TARGET = testMyProject
                              TEMPLATE = app
                              
                              
                              SOURCES += main.cpp\
                                      eyecare.cpp \
                                  others.cpp
                              
                              HEADERS  += eyecare.h \
                                  others.h
                              
                              FORMS    += eyecare.ui
                              
                              RESOURCES += \
                                  images.qrc
                              
                              
                              win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                              win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
                              else:win32:CONFIG(debug,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
                              else:unix: LIBS += -L$$PWD/Library/ -ldxva2
                              
                              INCLUDEPATH += $$PWD/Library
                              DEPENDPATH += $$PWD/Library
                              
                              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Library/ -luser32
                              else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Library/ -luser32
                              else:unix: LIBS += -L$$PWD/Library/ -luser32
                              
                              INCLUDEPATH += $$PWD/Library
                              DEPENDPATH += $$PWD/Library
                              
                              DISTFILES +=
                              
                              

                              what is a signature ?? Lol

                              K 1 Reply Last reply
                              0
                              • AhtiA Ahti

                                @koahnig

                                those three errors that i already mentioned.

                                my new pro file:

                                #-------------------------------------------------
                                #
                                # Project created by Ahtisham 2016-08-16T13:18:59
                                #
                                #-------------------------------------------------
                                
                                QT       += core gui
                                
                                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                                
                                TARGET = testMyProject
                                TEMPLATE = app
                                
                                
                                SOURCES += main.cpp\
                                        eyecare.cpp \
                                    others.cpp
                                
                                HEADERS  += eyecare.h \
                                    others.h
                                
                                FORMS    += eyecare.ui
                                
                                RESOURCES += \
                                    images.qrc
                                
                                
                                win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
                                win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
                                else:win32:CONFIG(debug,debug|release): LIBS += -L$$PWD/Library/ -ldxva2
                                else:unix: LIBS += -L$$PWD/Library/ -ldxva2
                                
                                INCLUDEPATH += $$PWD/Library
                                DEPENDPATH += $$PWD/Library
                                
                                win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Library/ -luser32
                                else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Library/ -luser32
                                else:unix: LIBS += -L$$PWD/Library/ -luser32
                                
                                INCLUDEPATH += $$PWD/Library
                                DEPENDPATH += $$PWD/Library
                                
                                DISTFILES +=
                                
                                
                                K Offline
                                K Offline
                                koahnig
                                wrote on last edited by
                                #21

                                @Ahti

                                Which means that the stubs in the lib-file are missing?
                                Do you have the import and export keyword handled correctly?

                                The dll and the stub-lib are generĂ¢ted with the same tool chain?

                                Vote the answer(s) that helped you to solve your issue(s)

                                AhtiA 1 Reply Last reply
                                0
                                • K koahnig

                                  @Ahti

                                  Which means that the stubs in the lib-file are missing?
                                  Do you have the import and export keyword handled correctly?

                                  The dll and the stub-lib are generĂ¢ted with the same tool chain?

                                  AhtiA Offline
                                  AhtiA Offline
                                  Ahti
                                  wrote on last edited by Ahti
                                  #22

                                  @koahnig what do you mean by "stubs in the lib-file" what is that ? i don't know anything about that. I just copied all the required dll and lib files from the system32 to Dll and Library folders of my project respectively. And what is import and export keyword ?

                                  I am creating this app just to let user change screen brightness and for that i need to use windows API and that is why i need those dll and lib files.

                                  have a look:

                                  https://msdn.microsoft.com/en-us/library/windows/desktop/dd692939(v=vs.85).aspx

                                  goto the link and see at the end in "Requirements" heading it clearly mentions which library and dll files you need to include in order to use that specific windows api function.

                                  what is a signature ?? Lol

                                  K 1 Reply Last reply
                                  0
                                  • AhtiA Ahti

                                    @koahnig what do you mean by "stubs in the lib-file" what is that ? i don't know anything about that. I just copied all the required dll and lib files from the system32 to Dll and Library folders of my project respectively. And what is import and export keyword ?

                                    I am creating this app just to let user change screen brightness and for that i need to use windows API and that is why i need those dll and lib files.

                                    have a look:

                                    https://msdn.microsoft.com/en-us/library/windows/desktop/dd692939(v=vs.85).aspx

                                    goto the link and see at the end in "Requirements" heading it clearly mentions which library and dll files you need to include in order to use that specific windows api function.

                                    K Offline
                                    K Offline
                                    koahnig
                                    wrote on last edited by
                                    #23

                                    @Ahti

                                    When creating a dll you will also create a library (it may have .lib as extension or .a depending on compiler). You need to link the library to your application which is using your dll. The library contains basically a reduced, short part (stub as the rest of tree when you have cut it down) .

                                    dllimport and dllexport it is called for MS compilers. An inpedendent way is with Q_DECL_IMPORT and Q_DECL_EXPORT

                                    What compiler are you using for creating your application?

                                    Vote the answer(s) that helped you to solve your issue(s)

                                    AhtiA 1 Reply Last reply
                                    0
                                    • K koahnig

                                      @Ahti

                                      When creating a dll you will also create a library (it may have .lib as extension or .a depending on compiler). You need to link the library to your application which is using your dll. The library contains basically a reduced, short part (stub as the rest of tree when you have cut it down) .

                                      dllimport and dllexport it is called for MS compilers. An inpedendent way is with Q_DECL_IMPORT and Q_DECL_EXPORT

                                      What compiler are you using for creating your application?

                                      AhtiA Offline
                                      AhtiA Offline
                                      Ahti
                                      wrote on last edited by
                                      #24

                                      @koahnig

                                      there you go:

                                      https://ibb.co/bDcoXk

                                      what is a signature ?? Lol

                                      K 1 Reply Last reply
                                      0
                                      • AhtiA Ahti

                                        @koahnig

                                        there you go:

                                        https://ibb.co/bDcoXk

                                        K Offline
                                        K Offline
                                        koahnig
                                        wrote on last edited by
                                        #25

                                        @Ahti

                                        From where did you get the include file HighLevelMonitorConfigurationAPI.h ?

                                        Vote the answer(s) that helped you to solve your issue(s)

                                        AhtiA 1 Reply Last reply
                                        0
                                        • K koahnig

                                          @Ahti

                                          From where did you get the include file HighLevelMonitorConfigurationAPI.h ?

                                          AhtiA Offline
                                          AhtiA Offline
                                          Ahti
                                          wrote on last edited by Ahti
                                          #26

                                          @koahnig I didn't get it from anywhere i just included it and qt responded on its own by mentioning it in the suggestion list. write this in your qt creator and it will give you a header file with this suggestion:

                                          #include <highlevelmonitorconfigurationapi.h>
                                          

                                          what is a signature ?? Lol

                                          K 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