- Home /
Fallback handler could not load lib under Linux (.so)
Hi all!
This is the first time I'm publishing an issue at this kind of resource, so excuse my for mistakes.
I'm developing an application, which uses third-part library (Guardant, for hardware protection). This library is a .NET assembly, which provides an API for native library. For example, WinAPI.dll is a native lib for windows, LinuxAPI.so for linux, and DotNetApi.dll is .NET assembly for managing protection functions in .NET.
Project has a link to DotNetApi.dll, which provides function SetPathToNativeApi. This function allows to change currently active native library (it is WinAPI.dll by default). Therefore, for Linux I use this function to access Linux API. Function usage is like this:
using Guardant;
class Protector{
public void Init(){
GrdApi.SetPathToNativeLib("/home/developer/GrdLibs/", "LinuxAPI_x32.so", "LinuxAPI_x64.so");
}
}
In console projects, developed in Mono, all is OK, libs are found at provided directory and successfully loaded. But when I try to use this library in Unity, it fails to load linux lib.
I haven't found Unity under Linux, so I can't launch it it editor and debug. I am just building project under Mac OS (and tried under Windows, no matter), then start on Linux, it works, but failes to load native library provided. Here is log I receiving:
Fallback handler could not load library /home/developer/UnityProjects/SubwayDebug/Subway_Linux_Debug_Data/Mono/x86_64/home/developer/GrdLibs/LinuxAPI_x64.so
where /home/developer/GrdLibs/ is a full path to lib, passed in the first argument in the code above. I tried to put library to the path from log, it didn't help (to give "/" as a first argument). Library is found successfully (File.Exists returns true).
I saw another topics with the same problem (for example, http://answers.unity3d.com/questions/606854/fallback-handler-could-not-load-library.html), but I don't see any dependencies from native libraries, and it works in console applications, so there should be another reason for this problem, in some Unity behavior I suppose.
I would like to read any suggestions of how can I make this stuff work :)
Does anybody have any ideas? By the way: I checked my lib with "ldd" util under Linux Ununtu x64, and it didn't show any dependencies. Console app loads it successfully. Are there any problems in my post content? Why nobody gave an answer yet?
Your answer
Follow this Question
Related Questions
How can I run it on Linux? 4 Answers
Would it be possible to build Unity projects from Linux? 1 Answer
Unity in linux plans after the announcement of SteamOS? 2 Answers
Ubuntu Master Server - compiler error 1 Answer
Linux Standalone and Japanese 0 Answers