Не удается открыть включаемый файл: 'cxxabi.h': нет такого файла или каталога - PullRequest
0 голосов
/ 12 апреля 2019

Я делаю игру, в которую можно играть на Mac и Windows, используя cocos2d-x.

Сначала я написал код в Xcode Mac, и он работал на Mac.

Когда яперенес проект в windows и попытался построить его в Visual Studio 2017, произошла ошибка.

Error   C1083   Cannot open include file: 'cxxabi.h': No such file or directory Narazumono  c:\users\masanori\desktop\narazumono3.17\classes_win\nrzcoding.cpp  10  

Я использую cxxabi.h, чтобы получить имя класса объекта.

#include "NRZCoding.h"
#include <cxxabi.h>
#include <cstdio>
#include <algorithm>
#include "NRZUtils.h"

using namespace std;
USING_NS_CC;

namespace NRZCoding {

...

    const string& EncodableObject::getClassName()
    {
        if (_className.size() > 0) {
            return _className;
        }

        const type_info& id = typeid(*this);
        int stat;
        char *name = abi::__cxa_demangle(id.name(),0,0,&stat);

        CCASSERT(name != NULL && stat == 0, "failed to demangle");

        _className = string(name);
        free(name);
        return _className;
    }

...

Что мне нужно сделать?

Я использую cocos2d-x 3.17.1 и Visual Studio 2017.

Спасибо.

...