использование ошибки компиляции angelscript

Я пытаюсь использовать angelscript 2.25.1 с помощью gcc 4.7.1

Я составил ангелскрипт без проблем.

Когда я пытаюсь скомпилировать свой проект, который использует angelscript, я получаю эту ошибку:

jarrett@jarrett-g74s:~/projects/myproject$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/common/as_wrapper/AngelScript.o -c -I"../lwis/src/engine" -I"../ice_engine/src/engine" src/common/as_wrapper/AngelScript.cpp
src/common/as_wrapper/AngelScript.cpp: In member function ‘void as_wrapper::AngelScript::loadScripts()’:
src/common/as_wrapper/AngelScript.cpp:85:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
src/common/as_wrapper/AngelScript.cpp:87:30: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
src/common/as_wrapper/AngelScript.cpp:88:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
src/common/as_wrapper/AngelScript.cpp: In member function ‘int as_wrapper::AngelScript::initContext(char*, char*)’:
src/common/as_wrapper/AngelScript.cpp:242:20: error: ‘class asIScriptModule’ has no member named ‘GetFunctionIdByDecl’
src/common/as_wrapper/AngelScript.cpp:258:22: error: invalid conversion from ‘int’ to ‘asIScriptFunction*’ [-fpermissive]
In file included from src/common/as_wrapper/AngelScript.h:11:0,
from src/common/as_wrapper/AngelScript.cpp:8:
/usr/local/include/angelscript/angelscript.h:734:26: error:   initializing argument 1 of ‘virtual int asIScriptContext::Prepare(asIScriptFunction*)’ [-fpermissive]
scons: *** [build/common/as_wrapper/AngelScript.o] Error 1
scons: building terminated because of errors.

Так что в принципе, он (я думаю, компилятор) не может найти GetFunctionIdByDecl функция в asIScriptModule, Я уверен, что это должно быть там, хотя.

Кроме того, код на Лин 242 является:

int funcId = mod->GetFunctionIdByDecl(function);

где function объявлен ранее как char* а также mod имеет тип asIScriptModule *mod,

Я думал, что это может быть проблема с GCC 4.7.1 …. но я не уверен.

1

Решение

Спасибо @chris за ответ.

Согласно источнику (строка 664 angelscript.h), GetFunctionIdByDecl
устарела, поэтому вам нужно #define AS_DEPRECATED использовать его.

1

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector