[Qt-interest] make moc generate .mm file?
Konstantin Tokarev
annulen at yandex.ru
Tue Oct 25 19:46:40 CEST 2011
25.10.2011, 21:29, "Israel Brewster" <israel at frontierflying.com>:
> Is there any way to get moc to generate a .mm file rather than a .cpp file? I have a file which includes some Objective-C code out of necessity of complying with the possible Mac App Store sandbox requirements (as I can't use Qt's open/save dialogs). However, if moc generates a .cpp file, it won't compile. Changing the extension on this file to .mm fixes things and allows compilation again, but of course it is changed back next time the file is generated. If it could be generated with a .mm extension, then everything would be fine. Is there any way to fix this?
You can try to #include your moc_xxx.cpp file into respective xxx.mm, and whole thing should be compiled as Obj-C++.
--
Regards,
Konstantin
More information about the Qt-interest-old
mailing list