Search code examples
slimdxjni4net

How to use JNI4NET when your C# library depends on existing managed dll?


My .NET program I want to use in Java depends on SlimDX, a managed wrapper over DirectX. I add it to the project references as normal without hiccup.

However, when it comes to using JNI4NET's build.cmd, I get a CS0400 error suggesting that it does not know what the hell SLimDX is, even though I referenced it properly and put it in the folder with proxygen. It cannot be found in the 'global namespace'.

This ('global::net.sf.jni4net.utils.Convertor.StrongJp2C') is one of the offending lines.

enter image description here


Solution

  • Actually, I figured it out! It's simple, there is a -dp option in proxygen to add .NET dependencies.