libzmq not found by clrzmq in Xamarin Studios/C# application

大城市里の小女人 提交于 2019-12-05 18:59:53

you might want to try using netmq (https://github.com/zeromq/netmq), is a 100% C# port of zeromq and might be easier to use then calling pinvoke.

if you're still looking for a solution...

You can use clrzmq4 and add statically linked libzmq and libsodium as native libraries to your xamarin solution.

Ensure you use the very latest version of clrzmq4,we just got it running today...

Is libzmq.dll next to your executable in the build output directory ?

The clrzmq NuGet package includes a PowerShell install script to set the build action for the libzmq.dll so it is always copied to the output directory. If you added the NuGet package on the Mac then the PowerShell script will not be run. So you will need to set the build action manually.

libzmq.dll seems to be a native dll compiled for Windows so it will not work on the Mac. So it looks like you will have to compile clrzmq on the Mac.

Have you created a dllmap in your config?

<configuration>
    <dllmap dll="libzmq.dll" target="/usr/local/Cellar/zeromq/4.0.4/lib/libzmq.dylib"/>
</configuration>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!