Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

using angelscript compile error


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Chisser98   Members   -  Reputation: 136

Like
0Likes
Like

Posted 13 November 2012 - 05:06 PM

Hi all,

I'm trying to use angelscript 2.25.1 using gcc 4.7.1

I compiled angelscript without issues.

When I try to compile my project that uses angelscript, however, I'm getting this error:

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.

So basically, it (I guess the compiler) can't find
GetFunctionIdByDecl
function in
asIScriptModule
. I'm pretyt sure it should be there though.

Also, the code on lin 242 is:
int funcId = mod->GetFunctionIdByDecl(function);
where 'function' is declared earlier as a 'char*' and 'mod' is of type 'asIScriptModule *mod'.

I thought this might be an issue with gcc 4.7.1....but I'm not sure.

Does anyone have any ideas?

I appreciate any help! Posted Image

Cheers

Jarrett

Sponsor:

#2 Chisser98   Members   -  Reputation: 136

Like
0Likes
Like

Posted 13 November 2012 - 05:57 PM

Apparently, that method is now deprecated.

Found out from Chris on stackoverflow (here: http://stackoverflow.com/questions/13370774/using-angelscript-compile-error)

According to the source (angelscript.h line 664), GetFunctionIdByDecl is deprecated, so you need to #define AS_DEPRECATED to use it



#3 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
0Likes
Like

Posted 13 November 2012 - 06:47 PM

The manual is also a good place to look for information like this :)

Or if you're upgrading from an older version and the deprecated functions have already been removed and thus not mentioned in the manual, then the change list will help you understand what has been modified over the various versions. The section 'Library interface' is specifically for giving this type of information.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS