Hi all,
I've wasted many time to search how I should configure my Qt Creator to link OpenAL in my application so I try with posting my problem right here.
Well my problem is very simple:
I have Qt Creator 2.0.1 with Qt 4.7 and Windows 7 x64 and haven't got any problem before trying to link OpenAL.
I saw that I have to add my library to "LIBS" in my .pro file. So here is my .pro:
QT += core gui
TARGET = OpenALTest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h\
sndfile.h
FORMS += mainwindow.ui
INCLUDEPATH += C:/OpenALSDK/include
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
-LC:/OpenALSDK/libs/ -lopenal32
QT += core gui
TARGET = OpenALTest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h\
sndfile.h
FORMS += mainwindow.ui
INCLUDEPATH += C:/OpenALSDK/include
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
-LC:/OpenALSDK/libs/ -lopenal32
To copy to clipboard, switch view to plain text mode
I downloaded OpenAL SDK which is composed (especially) of .h file that I include and an OpenAL32.lib file which I mention in my "LIBS" configuration variable.
The result I have is:
C:\Qt\2010.05\qt\OpenALTest-build-desktop/../OpenALTest/mainwindow.cpp:31: undefined reference to `_imp__alcOpenDevice'
C:\Qt\2010.05\qt\OpenALTest-build-desktop/../OpenALTest/mainwindow.cpp:39: undefined reference to `_imp__alcCreateContext'
C:\Qt\2010.05\qt\OpenALTest-build-desktop/../OpenALTest/mainwindow.cpp:47: undefined reference to `_imp__alcMakeContextCurrent'
...
I believe that my code won't help you because it's just a link problem but ask me if necessary.
I also tried with this:
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
-LC:/OpenALSDK/libs/OpenAL32.lib
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
-LC:/OpenALSDK/libs/OpenAL32.lib
To copy to clipboard, switch view to plain text mode
and
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
C:/OpenALSDK/libs/OpenAL32.lib
LIBS += -LC:/Qt/2010.05/qt/OpenALTest/ -lsndfile-1 \
C:/OpenALSDK/libs/OpenAL32.lib
To copy to clipboard, switch view to plain text mode
May someone help me?
Thx
Bookmarks