1
votes

I'm trying to add net-snmp lib to my project using win7 + cygwin: Add library

Project file seems to contain valid lib and path entries:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/C:/usr/lib/ -lnetsnmp else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/C:/usr/lib/ -lnetsnmpd

INCLUDEPATH += $$PWD/C:/usr/include DEPENDPATH += $$PWD/C:/usr/include

But I can't build the project, because include file is not found, also it exists under given directory physically (c:/usr/include/net-snmp/net-snmp-config.h)

../snmptest1221313123/main.cpp:1:38: fatal error: net-snmp/net-snmp-config.h: No such file or directory #include

I've read all "add external lib" topics, but it doesn't help to solve this. Re-running qmake, re-opening Qt creator, or running qmake -r from terminal doesn't help neither.

1
Why the full paths begin with: $$PWD/ ? Remove that (both from include and libs) and try again: run qmake and rebuild. - Zlatomir
Thanks, removing "$$PWD/" solved the problem, I would accept this answer if it were not a comment :-) - lzdt

1 Answers

1
votes

Remove $$PWD/ (both from include and libs) and try again: run qmake and rebuild.