Sign in to follow this  
noizex

Including AngelScript causes generation of additional .lib

Recommended Posts

Hello,

I tried to figure it on my own but I failed so I have to ask here - its not a big problem but I'd like to understand why it happens and if possible, prevent it. I include AS as static lib (angelscript.lib obtained from sdk) and then just include its headers to use it, but this caused my project to compile into additional .lib file, on top of Client.exe that is also generated. I checked what it contains and here it is:

[b]Creating library F:\Release\Client\Client.lib and object F:\Release\Client\Client.exp[/b]

[font=courier new,courier,monospace]Dump of file Client.lib[/font]

[font=courier new,courier,monospace]File Type: LIBRARY[/font]
[font=courier new,courier,monospace] Exports[/font]
[font=courier new,courier,monospace] ordinal name[/font]
[font=courier new,courier,monospace] _asAcquireExclusiveLock
_asAcquireSharedLock
_asCreateScriptEngine
_asGetActiveContext
_asGetLibraryOptions
_asGetLibraryVersion
_asPrepareMultithread
_asReleaseExclusiveLock
_asReleaseSharedLock
_asResetGlobalMemoryFunctions
_asSetGlobalMemoryFunctions
_asThreadCleanup
_asUnprepareMultithread[/font]

Everything works fine of course, but I wonder if its necessary, or I did something wrong? Maybe I need to specify some #define?

Share this post


Link to post
Share on other sites
Those are the global external functions. The .lib is created by the compiler/linker automatically when it sees exported functions.

There might be some option to turn this off, but unless you're really bothered by it you can safely ignore it and simply discard the extra .lib.

Regards,
Andreas

Share this post


Link to post
Share on other sites
As an additional note, this can actually be useful for tooling, etc depending on your application structure. Instead of linking AS statically with your standalone script compiler (if that's how you do things, again) and having to worry about keeping the two builds in sync, you can actually just import the functions from the main game executable and use those instead, at least on Windows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this