Re: Phonon linking problem
Did you compile Qt with Phonon support?
Or, did you install the Qt Phonon library (it might be separate on your system)
Re: Phonon linking problem
Yes, I would assume that Phonon is installed because I am able to compile the phonon example, as well as it runs fine. Also, in my lib directory in Qt, I have libphonon.a and libphonond.a
Re: Phonon linking problem
Do you have this line:
in your .pro file?
Re: Phonon linking problem
Re: Phonon linking problem
I have tried to replicate that, and i can't
The only case when i get that errors, is missing QT += phonon, did you "rebuild" (run qmake again) after adding the QT += phonon? (sometimes simply clicking on the Build button <the green one> doesn't rebuild and the compiler still doesn't find the libraries, even if added)
Also check that <Phonon/MediaObject> and <Phonon/MediaSource> files are included, not only forward declared.
Re: Phonon linking problem
Well I manually ran qmake, since rebuild did not work, and it is not trying to link the phonon libs
Code:
Running build steps for project ***...
Starting: "c:/qt/2010.04/qt/bin/qmake.exe" D:/Projects/***/***.pro -r -spec win32-g++
The process "c:/qt/2010.04/qt/bin/qmake.exe" exited normally.
This is my .pro file
Code:
QT += core gui \
phonon
TARGET = ***
TEMPLATE = app
SOURCES += main.cpp\
***.cpp
HEADERS += ***.h
FORMS += ***.ui
RESOURCES += \
images.qrc
Re: Phonon linking problem
One thing that might be a problem is the difference in build configurations between the phonon libs and your program.
Is the Qt and Phonon library compiled with the same compiler and settings as your program?
Re: Phonon linking problem
I never manually compiled any of the libs, I downloaded the SDK for Windows.
Re: Phonon linking problem
Bingo :-)
Which version did you download? Visual studio version or minGW?
After finding out which you downloaded, how do you build your program. Using visual studio? or the minGW tools?
If both differ, you get these errors.
Re: Phonon linking problem
I downloaded the minGW version as well as I use the minGW toolchain
Re: Phonon linking problem
You downloaded the minGW toolchain separatly? If so, this might also be a problem.
Suggestion:
Remove all
Download the latest Qt SDK. This includes everything and works out of the box.
Re: Phonon linking problem
No I did not download it seperately, I use the MinGW toolchain that comes with the SDK
Re: Phonon linking problem
Is there a qmake flag that I can manually invoke for libphonon?
Re: Phonon linking problem
Quote:
Originally Posted by
Decessus
Is there a qmake flag that I can manually invoke for libphonon?
I'm not sure what you mean, but I guess no.
You include the phonon library with QT += phonon
What you see are linker errors which means that the linker can't find certain symbols in the phonon library.
This in turn means that the library isn't found or it is compiled with another compiler (symbols are messed up).
Since neither case describes your problem, I'm out of ideas.
Can you please give more information? Describe exactly what you downloaded, every step you did between installing what you downloaded and building your program, including the full source code.
Re: Phonon linking problem
Hmm, well I seemed to have solved my problem, which apparently was caused by manually including windows.h in an attempt to use PlaySound();
Thank you for your patience and help :)