Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to build qtmultimedia for OS X
I've been unable to get qtmultimedia to build for OS X. This is what I tried:
- cloned the git repository (git://gitorious.org/qt/qtmultimedia.git),
- qmake -spec macx-clang ../qtmultimedia/qtmultimedia.pro
It seems to compile the c/c++ code just fine but chokes on the objective c code. I get several errors. Some examples:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/objc/NSObject.h:11:1: error: expected
@class NSString, NSMethodSignature, NSInvocation;
unknown type name 'NSString'; did you mean 'QString'?
FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);@
It appears to be trying to compile the objective c code as c++. What am I doing wrong? Any help?
Qt Multimedia is part of Qt 5, you do not need to compile it separately. Which version of Qt are you using?
I'm using Qt 5.3.
It is included and working fine but the AVFoundation plugin backend is severely lacking in some areas. My project requires a couple enhancements to the camera capture code so I am going to make those enhancements and submit patches back to the maintainers.
I've already made these enhancements to the Windows (DirectShow) back end and it works great...just need to figure out how to get it to compile on OS X now.
Ah, ok. It might be that you need some other modules present (definitely QtCore, so qtbase repo, plus probably QtGui). But if you compiled it on Windows successfully, then you probably know the drill.
I suggest asking on development mailing list, or the IRC. Those are the 2 places where developers of Qt reside.
Since you are adding new functionality, you should first checkout the dev branch
ylopes last edited by
Try building all of Qt5, you can find instructions there: http://qt-project.org/wiki/Building_Qt_5_from_Git
You can skip QtWebkit with the option --no-webkit when running the init-repository script. You don't need it and it takes a while to build...
As mentioned, if you plan to submit new features, you need to do it on the dev branch. You can find some instructions and guidelines there: http://qt-project.org/wiki/Qt-Contribution-Guidelines
I was being stupid. I added a file in the AVFoundation plugin with .cpp extension that also imported objective c headers. duh.
After renaming it to .mm it compiles just fine.
I've checked out the dev branch, read the contribution guidelines and will be submitting a patch for review shortly.