ZeroMQ Issue (can't import unmanaged 'libzmq.dll')

Created at 23 Sep 2021, 22:21
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ctrader.guru's avatar

ctrader.guru

Joined 19.07.2018

ZeroMQ Issue (can't import unmanaged 'libzmq.dll')
23 Sep 2021, 22:21


Good evening friends,

I recently met a project that involves the use of ZeroMQ libraries. I was able to interface the communication protocol with MT4 and MT5 but with cTrader I have some problems.

Through Nuget I have loaded ZeroMQ which is a wrapper to manage 'libzmq.dll', the problem is that it is not possible to insert this library as a reference because it is unmanaged, even if I insert the library in the ctrader.exe folder I can not get results.

Do you have any suggestion?

 

ZeroMQ : GitHub - zeromq/clrzmq4: ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)


@ctrader.guru
Replies

ClickAlgo
24 Sep 2021, 08:22 ( Updated at: 21 Dec 2023, 09:22 )

RE:

ctrader.guru said:

Good evening friends,

I recently met a project that involves the use of ZeroMQ libraries. I was able to interface the communication protocol with MT4 and MT5 but with cTrader I have some problems.

Through Nuget I have loaded ZeroMQ which is a wrapper to manage 'libzmq.dll', the problem is that it is not possible to insert this library as a reference because it is unmanaged, even if I insert the library in the ctrader.exe folder I can not get results.

Do you have any suggestion?

 

ZeroMQ : GitHub - zeromq/clrzmq4: ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)

Hi, L,

You can just add it as a NuGet package via Visual Studio and it will handle installing and referencing for the correct framework and configuration.

 

If you want to use the communications protocol you need to use NetMQ and this is not compatible with .NET 4 client

 

If you change the target framework to 4.5 it will install the package.

You will have to install additional packages to get the communication code example to work.

 

Hope that helps, did not know 100% what you were after.


@ClickAlgo

ctrader.guru
24 Sep 2021, 10:13

RE: RE:

Good morning my friend,

actually I said that I have already loaded ZeroMQ "...I have loaded ZeroMQ..." but I can't reference the library "libzmq.dll" because ZeroMQ depends on this library.

I made some tests with console applications and I have no problem because I can put this library "libzmq.dll" together with ZeroMQ.dll but with cTrader things are complicated, if you are able to make a working example I would be grateful.

Regarding NetMQ I never had problems, in fact I was asking for help only for ZeroMQ because my client needs to work with that specific library.

Thanks again for your reply, the search continues....

 


@ctrader.guru

ClickAlgo
24 Sep 2021, 10:32 ( Updated at: 24 Sep 2021, 10:33 )

Can you post a snippet code example which uses this library and that you are attempting to use ? 


@ClickAlgo

ctrader.guru
24 Sep 2021, 15:22

RE:

I investigated and it turns out that with cannot insert or manage unmanaged libraries without a reference, even if I copy the library to the root directory it fails to reference that library.

I finally convinced my client that the best solution was NetMQ, I almost finished the project.

Thanks for your interest.

 


@ctrader.guru