What exactly error(s) do you get, when compiling a Phonon-based application with MinGW? Or is it in principle not possible to do that with MinGW?
What exactly error(s) do you get, when compiling a Phonon-based application with MinGW? Or is it in principle not possible to do that with MinGW?
It seems that it is in principle not possible to do that with MinGW. In the Qt documentation it says: "Warning: The MinGW version of Qt does not support building the Qt backend. ". I
f you do try, the compiler generates a sh*tload of errormessages, most of which are related to "WINAPI".
can't you build the backend with VC? after all it is free and it's not like you'll have to use it for the rest of your life.
Nope, i tried that, but the backend built with Visual Studio won't work when the rest of the application is built with mingw.
Well the Dlib lib has a GStreamer frontend for Qt. And I believe there's a GStreamer version for Windows. Take a look at it: http://gitorious.org/projects/dlib/
Im not sure if this applies to you, but I did once have a DLL built with Visual Studio which was closed source and that I needed to access with a Mingw compiled program. what I did was use the
"LoadLibrary" and "LoadMethod" which you can look up in more detail in MSDN, but heres kindof how it works:
Qt Code:
long someFunction () { //get library names const char* libraryName = "library.dll"; const char* methodName= "MethodInLibaray"; //boolean result long result = 0; //load library HINSTANCE library = LoadLibrary(libraryName); FARPROC methodPointer = loadMethod(env,library,libraryName,methodName); if(methodPointer != NULL) { result = ((LONGPROC_CCHAR)methodPointer)(text); } return result; }To copy to clipboard, switch view to plain text mode
That works in case your dll is independent of your other toolkit classes, which is not the case with phonon. You will very likely get an error because you mix two different compilers for the same toolkit libaries.
The answer to phonon with mingw is simple : blame mingw. They have stuck with gcc 3.x which is not compatible with the necessary windows libaries for directshow which phonon uses.
It might work with unofficial or beta builds of mingw which are gcc 4.x based. I know that latest kde could be successfully compile with the latest builds, so that might be worth trying.
However as long as there is no official gcc 4.x build of mingw, Qt has no option other than not support phonon with mingw.
Bookmarks