[Interest] OSX moc_file compile error

Jason H jhihn at gmx.com
Mon Feb 8 21:55:56 CET 2016


> Em segunda-feira, 8 de fevereiro de 2016, às 16:14:53 PST, Jason H escreveu:
> > I'm building a modified version of Qt, I'm not used new to Objective-C. I
> > have to include AVFoundation.h, because it has NSString key IDs, but when I
> > do, the moc_ version of the file bombs out. How do I fix this?
> 
> Option 1: do not include Objective-C-only headers in headers with Q_OBJECT. 
> Include only headers that have C / C++ versions, or #ifndef out the 
> inclusions.
> 
> Option 2: #include "moc_avfaudioencodersettingscontrol.cpp" at the end of your 
> .mm source file.


Awesome, thanks Thiago! I never would have thought of that. 



More information about the Interest mailing list