2

有人设法让 Perforce p4api.net 在 Linux 上工作吗?

我的项目在 Mono 2.8.4 上正确构建,dll(p4bridge.dll 和 p4api.net.dll 位于 bin/Debug 中,但每当我尝试执行它时,都会出现以下异常:

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

API 是最新的(2013.3),其中提到了 MonoDevelop 2.8.4,并且所有单声道 RPM 都是最新的。

同样,如前所述,两个 Perforce DLL 都被复制到 bin/Debug 中,项目可以正确编译,并且确实找到了 p4api.net.dll(如异常所示),但没有找到 p4bridge.dll。我开始怀疑 p4bridge.dll 不是托管的 .NET 库。

有任何想法吗 ?

--JFG

4

1 回答 1

0

p4bridge 不是托管库,因此您需要为每个要运行的平台构建它。

如果您想在 Mono 中使用 P4NET.API,您可以查看P4Connect源代码。该项目包括一个版本的 P4NET.API 库,它在 Mono 下的 OSX 中工作。不过,他们尚未将该代码集成回主 P4NET.API 库中。

于 2015-07-23T01:10:50.403 回答