I’m trying to use AngelScript library with Unreal Engine. After following the tutorial here I’m stuck at linker error.
scriptTestCharacter.cpp.obj : error LNK2001: unresolved external symbol "private: static class asIScriptEngine * AscriptTestCharacter::engine" (?engine@AscriptTestCharacter@@0PEAVasIScriptEngine@@EA)
The static library I’m using was built in the same compiler, with 64 bit platform selected, using the Multi-threaded DLL runtime.
I have tested the library in a separate project outside of UE and it compiles and works just fine.
Are there any other steps I might have missed? So far i’ve done the following:
- Compiled the library using the provided settings (64 bit, static, with multi threaded DLL runtimes)
- Copied the library and includes to a folder in project directory
- Edited the scriptTest.Build.cs to link the library using UE4 build system
- Added include and library folders to MSVC project directories.
scriptTest.Build.cs file: link
MSVC build log: link
I am sure the build system can find the library file. After making a typo in the library file name, the error changed accordingly.