语言

Menu
Sites
Language
DllNotFound exception when using a .so file that references another .so file in it

I am trying to create a project that uses native C/C++ code on C# .net tizen watch aplication.

I followed this step by step found on this thread:

https://developer.tizen.org/forums/tizen-.net/xamarin-how-create-static-library-cc

 

and successfully used the .so file in the C# project.

My current setup is:

1- .so file that was provided to me by Samsung in my current project.

2- A C/C++ project that implements the interfaces required on that .so file. This project becomes a .so that will be used by C#.

3- C# project that the rest of the company develops.

 

If my C/C++ project does not reference another .so file, it works as intended.

 

If I add a reference in Propriety>C/C++ Buid>Settings>C++Linker to the samsung's .so, when I export this to C#, this erro happens:

 

How should I setup the linkage?

响应

1 回复
Tizen .NET

Hi,
It looks like a native library loaded by PInvoke has dependency for another native library in the same directory but outside the loader's searching path and this library is unable to load.
Could you try to set RPATH? -Wl,-rpath,'$ORIGIN'