PDA

View Full Version : Qmake gives me following problem



code_err
12th October 2011, 21:26
When i use qmake in command line on my .pro file in Windows to make Makefile there is a problem with INCLUDEPATH i suppose.

I put qextserialport files(headers, lib and dll) in qextserialport folder and add path to INCLUDEPATH variable but it's show me error.
the output is:

Ja@Ja-Komputer /h/Programowanie/Qt 4.7/prg011
$ qmake
WARNING: Failure to find: qextserialport_global.h
WARNING: Failure to find: qextserialport.h
WARNING: Failure to find: qextserialport_global.h
WARNING: Failure to find: qextserialport.h

and .pro file's excerpt

TEMPLATE = app

QT += gui core
INCLUDEPATH += $$quote(H:/Programowanie/Qt 4.7/prg011/qextserialport/)
QMAKE_LIBDIR += $$quote(H:/Programowanie/Qt 4.7/prg011/qextserialport/)

CONFIG(debug, debug|release) {
LIBS += -lqextserialportd
} else {
LIBS += -lqextserialport
}
win32:LIBS += -lsetupapi

ChrisW67
13th October 2011, 04:14
Have you listed those headers in the PRO file HEADERS variable?

Qmake doesn't know about the compiler include paths and will not search for files by their bare file name. Largely irrelevant though because MOC does not need to see these files again, so they need not be in HEADERS.

code_err
14th October 2011, 17:43
Probably i don't understand correctly, i added of course as always those files to HEADERS variable, i thought i should be that way.
I remove them from HEADERS and project compiles. Hmm, strange.

ChrisW67
15th October 2011, 02:11
No, not strange at all. HEADERS is a list of files in your project code that Qt builds dependency information for and sets up for moc if required. Assuming you are not working on the qextserialport library code itself, then the qextserialport headers are:

Not part of the changeable part of your project that requires detailed dependency info. They are analogous to all the system and Qt headers you use without listing: a fixed part of the compilation landscape.
Not locatable by qmake or moc without a full path anyway (the actual error).