Question

I'm a bit of a newbie at Qt and i can't find why my .h from my lib won't be included.

the error message is :

error: setting.h: No such file or directory

the lib was build without trouble.

i added it with Qtcreator by right cliking on my program project -> add library -> External library -> browse for my library file and path on my computer and added the libToolSettin.a.

This produced this code to add it into the .pro file:

unix|win32: LIBS += -L$$PWD/../Tools/build-libToolSetting-Desktop-Debug/ -llibToolSetting

INCLUDEPATH += $$PWD/../Tools/build-libToolSetting-Desktop-Debug DEPENDPATH += $$PWD/../Tools/build-libToolSetting-Desktop-Debug

win32: PRE_TARGETDEPS += $$PWD/../Tools/build-libToolSetting-Desktop->Debug/libToolSetting.lib else:unix: PRE_TARGETDEPS += $$PWD/../Tools/build-libToolSetting-Desktop-Debug/liblibToolSetting.a

i'm a at loss as to why it won't work so thanks for your help in advance.

Was it helpful?

Solution

Libraries have binaries and headers. Headers are not automagically available just because you linked in the binary library files. You have to ensure that they are on the inclusion path in your compiler settings.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top