Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Debug and Release Modes


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
3 replies to this topic

#1 Rizwan Khalid   Members   -  Reputation: 122

Like
0Likes
Like

Posted 27 July 2004 - 02:37 AM

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

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3352

Like
0Likes
Like

Posted 27 July 2004 - 06:53 AM

You're getting the missing symbol errors when you compile the DLL in release mode. You can fix this by removing the symbols from the dll project settings -> link -> category: input -> force symbol references. Remove the references to the bstr functions from that field and the dll should compile correctly.

But you don't actually have to build the dll. Just set the lib as the active project and compile only that one.

Assuming the lib compiled correctly you shouldn't have any trouble using the bstr in release mode. Let me know if what I told you fixed the problem.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Rizwan Khalid   Members   -  Reputation: 122

Like
0Likes
Like

Posted 28 July 2004 - 05:34 PM

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



#4 Andreas Jonsson   Moderators   -  Reputation: 3352

Like
0Likes
Like

Posted 29 July 2004 - 01:32 AM

Well, as you discovered AngelScript doesn't support fastcall yet. But if you feel up to it you could add the support as a contribution to the library. Or, write wrapper functions that uses either the cdecl or the stdcall calling conventions.


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