Including AngelScript causes generation of additional .lib

Started by
1 comment, last by InvalidPointer 11 years, 7 months ago
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:

Creating library F:\Release\Client\Client.lib and object F:\Release\Client\Client.exp

[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?

Where are we and when are we and who are we?
How many people in how many places at how many times?
Advertisement
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

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

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.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

This topic is closed to new replies.

Advertisement