Question

Anyone managed to get the Perforce p4api.net work with Linux ?

My projects build correctly on Mono 2.8.4, the dlls (p4bridge.dll and p4api.net.dll are in bin/Debug, but whenever I try to execute it, I get this exception :

Unhandled Exception: System.DllNotFoundException: p4bridge.dll
  at (wrapper managed-to-native) Perforce.P4.P4Bridge:ConnectA (string,string,string,string,Perforce.P4.P4CallBacks/LogMessageDelegate)
  at Perforce.P4.P4Server..ctor (System.String server, System.String user, System.String pass, System.String ws_client) [0x00000] in <filename unknown>:0 
  at Perforce.P4.Connection.Connect (Perforce.P4.Options options) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: p4bridge.dll
  at (wrapper managed-to-native) Perforce.P4.P4Bridge:ConnectA (string,string,string,string,Perforce.P4.P4CallBacks/LogMessageDelegate)
  at Perforce.P4.P4Server..ctor (System.String server, System.String user, System.String pass, System.String ws_client) [0x00000] in <filename unknown>:0 
  at Perforce.P4.Connection.Connect (Perforce.P4.Options options) [0x00000] in <filename unknown>:0

The API is the latest (2013.3) with MonoDevelop 2.8.4 as mentionned, and all mono RPMs are up to date.

Again, as mentionned, both Perforce DLLs are copied into bin/Debug, the project compiles properly, and it does find the p4api.net.dll (as the exception shows), but not the p4bridge.dll. I'm starting to suspect that p4bridge.dll is not a managed .NET library.

Any ideas ?

--JFG

Was it helpful?

Solution

p4bridge is not a managed library so you would need to build it for each platform that you want to run on.

If you want to use P4NET.API in Mono, you could take a look at the P4Connect source code. That project includes a version of the P4NET.API library which works in OSX under Mono. They have yet to integrate that code back into the main P4NET.API library though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top