In my Visual studio 2012 ,C++11 static function I have:
kuku* kuku::createKuku(bool enable, std::string dumpPat)
{
#ifndef ANDROID
#include "kukuWin.h"
return new kukuWin(enable, dumpPat);
#else
#include "kukuAndroid.h"
return new kukuAndroid(enable, dumpPat);
#endif
}
in c++98 it works , but here I have multiple errors:
1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\excpt.h(29): error : linkage specification is not allowed
1> extern "C" {
1> ^
1>
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\windef.h(17): error : linkage specification is not allowed
1> extern "C" {
1> ^
1>
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\specstrings.h(49): error : linkage specification is not allowed
1> extern "C" {
1> ^
1>
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\driverspecs.h(133): error : linkage specification is not allowed
1> extern "C" {
1> ^
1>
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\minwindef.h(42): error : linkage specification is not allowed
1> extern "C" {
1> ^
:)
Can anyone help me with it,
Thanks
Aucun commentaire:
Enregistrer un commentaire