문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top