[Qt-creator] Errors while compiling my plugin.

Typz thetypz at gmail.com
Sat May 16 16:44:13 CEST 2015


Hello,

This may be an issue with c++11, which is not enable by default (at least on Mac OS). So maybe you need to enable it in your .pro file like this:
 CONFIG += c++11

Best regards,

> On 16 mai 2015, at 14:02, Yang.H <hyll1018 at gmail.com> wrote:
> 
> I'm using Qt Creator 3.3.2 based on Qt 5.4.1 on my MAC.
> 
> I created a plugin and added something in it including inheriting some coreplugin classes. Like the IDocumentFactory class.
> 
> But when I compile my plugin, errors emerged:
> no type named 'function' in namespace 'std'
>     typedef std::function<IDocument *(const QString &fileName)> Opener;
>                         ^
> Why cannot I use function template in std in my plugin?
> 
> Is there anyone who is familiar with this coreplugin code?
> 
> Young.
> 
> C.S.Peking University
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150516/86c2ba05/attachment.html>


More information about the Qt-creator mailing list