I want to use libsndfile library in a Qt project, then I need to link it but I always get an error :
main.cpp:129: error : undefined reference to `sf_open'
main.cpp:137: error : undefined reference to `sf_write_short'
I tried to add these lines to my .pro
1) INCLUDEPATH += C:/libsndfile/include LIBS += -LC:/libsndfile/lib/libsndfile-1.lib
2) INCLUDEPATH += C:/libsndfile/include/ LIBS += C:/libsndfile/lib/libsndfile-1.lib
3) win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../libsndfile/lib/ -llibsndfile-1
INCLUDEPATH += $$PWD/../../../../../../libsndfile/include DEPENDPATH += $$PWD/../../../../../../libsndfile/include
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../libsndfile/lib/libsndfile-1.lib
Can you help me ,please, to link sndfile library correctly?