how to fix " Missing argument to '-L' " error ?
-
wrote on 15 Jun 2017, 09:30 last edited by
Hi
I was working on a project in qt but suddenly it generated a strange error saying :
error: missing argument to '-L'
what is that ? and how should i fix it ?
please help.
thanks -
wrote on 15 Jun 2017, 10:08 last edited by
Could you show your .pro file?
What exactly do you mean by "suddenly"? Did a restart, update occur between the working and non-working state? -
Could you show your .pro file?
What exactly do you mean by "suddenly"? Did a restart, update occur between the working and non-working state?wrote on 15 Jun 2017, 10:12 last edited by#------------------------------------------------- # # 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 +=
no neither restart nor update occurred but i don't know what caused this problem it was working fine.
-
wrote on 15 Jun 2017, 11:55 last edited by
If you lucky you can clean (or even delete) the target folder)
Then run qmake + build.Did you change any folders or library names?
Do you use a version system? Then you can compare the differences?
-
#------------------------------------------------- # # 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 +=
no neither restart nor update occurred but i don't know what caused this problem it was working fine.
wrote on 15 Jun 2017, 12:03 last edited by koahnig@Ahti said in how to fix " Missing argument to '-L' " error ?:
#------------------------------------------------- # # 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 +=
no neither restart nor update occurred but i don't know what caused this problem it was working fine.
In here shall be probably a '$' sign
win32:CONFIG(release,debug|release): LIBS += -L&&PWD/Dll/ -ldxva2
change to
win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
-
@Ahti said in how to fix " Missing argument to '-L' " error ?:
#------------------------------------------------- # # 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 +=
no neither restart nor update occurred but i don't know what caused this problem it was working fine.
In here shall be probably a '$' sign
win32:CONFIG(release,debug|release): LIBS += -L&&PWD/Dll/ -ldxva2
change to
win32:CONFIG(release,debug|release): LIBS += -L$$PWD/Dll/ -ldxva2
wrote on 15 Jun 2017, 12:34 last edited by Ahti -
wrote on 15 Jun 2017, 12:59 last edited by 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 ?
-
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 ?
-
wrote on 15 Jun 2017, 13:16 last edited by
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 -
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 onwrote on 15 Jun 2017, 13:48 last edited by AhtiOkay 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 -
wrote on 15 Jun 2017, 13:55 last edited by
what is in your $$PWD/Dll/ folder?
-
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();
etcwrote on 15 Jun 2017, 14:13 last edited by@Ahti said in how to fix " Missing argument to '-L' " error ?:
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();
etcThe 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. -
wrote on 15 Jun 2017, 15:47 last edited by
@Ahti said in how to fix " Missing argument to '-L' " error ?:
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. -
@Ahti said in how to fix " Missing argument to '-L' " error ?:
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. -
wrote on 15 Jun 2017, 16:04 last edited by
@Ahti said in how to fix " Missing argument to '-L' " error ?:
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. -
@Ahti said in how to fix " Missing argument to '-L' " error ?:
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.wrote on 16 Jun 2017, 12:59 last edited bythose 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 +=
1/33