最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

unity game engine - Error importing a Windows static library as a plugin - Stack Overflow

programmeradmin0浏览0评论

I am trying to import a third-party static library as a plugin into unity. I copied the library to Assets/Plugins/x64 folder and set the OS of the Plugin to Windows and architecture to x64. However, while it compiles the code fine, when I run the scene that uses the code from this static library, it complains DllNotFoundException: cspice assembly: type: member:(null). Can Unity import static libraries? I have this static library imported using the PINVOKE feature like this:

[DllImport("cspice")] public extern static void furnsh_c(string file);

I can confirm that the script for these PINVOKE statements and the static library (cspice.lib) are located in the same directory. Note that I don't have this issue with plugins that have a dynamic link library (DLL).

I would any suggestions/recommendations to get this working.

Thanks, Datri

发布评论

评论列表(0)

  1. 暂无评论