I want to add an audio library into my project but when I try to do this, I get this error message:
cannot find -lOpenAL32d
cannot find -lEFX-Utild
error: ld returned 1 exit status
I added the libraries by "add library" and then I chose the correct paths to OpenAL 1.1. I'm not sure what I'm doing wrong but when I delete lines in .pro file with "INCLUDEPATH +=[...]" etc., I get completly different error, so it seems that the program detects those libraries but something is wrong though. Any suggestions what I could have done wrong?
EDIT: Posted .pro file. Version 1:
----------------------------------------------
QT += core gui
QT += multimedia
QT += core
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Apollo01
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs
deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp \
read.cpp
HEADERS += \
mainwindow.h \
read.h
FORMS += \
mainwindow.ui
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/' -lOpenAL32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/' -lOpenAL32d
INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/include'
DEPENDPATH += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/include'
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/OpenAL32d.a'
returns
cannot find -lOpenAL32d
and the second version (used static option):
//[...]
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/' -lOpenAL32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/' -lOpenAL32d
else:unix: LIBS += -L$$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/' -lOpenAL32
INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/include'
DEPENDPATH += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/include'
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/libOpenAL32.a'
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/libOpenAL32d.a'
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/OpenAL32.lib'
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/OpenAL32d.lib'
else:unix: PRE_TARGETDEPS += $$PWD/'../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/libOpenAL32.a'
returns
No rule to make target 'C:/Users/Kacper/Documents/Apollo01/../../../../Program Files (x86)/OpenAL 1.1 SDK/libs/Win32/libOpenAL32d.a', needed by 'debug\Apollo01.exe'. Stop.