Rizwan Khalid

  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Rizwan Khalid

  • Rank
  1. Preprocessor

    Hello Deyja I have also made a preprocessor as part of my project that uses angelscript. As far as the problem of relative path and default path for the #include is concerned, i have solved that. So if you want i can help you in this regard. (you have to deal with GetCurrentDirectory() and SetCurrentDirectory()) The area where i am stuck is also macro and i can not use my own convention as you have used(# before ()) because i have to parse C++ header file. The simple Definitions such as #define INT int are not difficult.(and I have coped) I would really appreciate any solution (even partial) and the identified problems in this regard. Regards Rizwan Khlid
  2. Debug and Release Modes

    Thanks very much for your reply. Actually the application in which I am using angel script uses fast call by default, and even after registering correctly it changes the calling convention to its default type. And this was all. I was actually very much frustrated that what is wrong and therefore checking every possible thing that came to my mind. (Fast call places the arguments in to the registers and this calling convention obviously doesn’t expect arguments to be in registers) Regards, Rizwan Khalid
  3. Debug and Release Modes

    The sdk builds correctly on Debug mode but on Release mode it shows following errors. LINK : error LNK2001: unresolved external symbol _asBStrAlloc@4 LINK : error LNK2001: unresolved external symbol _asBStrFree@4 LINK : error LNK2001: unresolved external symbol _asBStrLength@4 Maybe bstr calls are left in the current version of AS(after seperating the default string type "bstr" from AS). I have copied the static library and linked to my project. When I try to pass bstr string from script to my application(both by reference and by value) it works fine, but on release mode it doesn't. On release mode my application recevies bad pointer. Help me i have spent much time doing this.. (May be i am doing a basic mistake, so let me know) Rizwan Khalid
  4. How to use STL in angelscript?

    No actually the first and the last solution came to my mind was the one that later on Andreas suggested...(make wrapper of every function and for each datatype) So i have postponed this idea for some time..
  5. How to use STL in angelscript?

    I am trying to add support of STL in angelscipt. The problem i am facing is i have to register every possible templated function.e.g. to register object of vector class engine->RegisterObjectType("vector", sizeof(vector<int>), 0); and to register push_back() engine->RegisterObjectMethod("vector", "void push_back(int)", asMETHOD(vector<int>::push_back), asCALL_THISCALL); still call to pop_back throws exception...(i think because of internal storage scheme of vector template) Is any one has use STL in his/her project or what is the method for using it? plus any support for using arrays?