[zeromq-dev] Mono: DllNotFoundException

Pekka Järvinen pekka.jarvinen at gmail.com
Sun Apr 26 20:09:54 CEST 2009

2009/4/26 Martin Sustrik <sustrik at fastmq.com>:
> Hi Pekka,
>> I'm trying to use ZeroMQ with Mono. I've compiled trunk version 1392.
>> I'm running Ubuntu and MonoDevelop out-of-the-box (VMWare).
>> I'm getting error:
>> Unhandled Exception: System.DllNotFoundException: libczmq
>>  at (wrapper managed-to-native) Zmq:zmq_create (string)
>>  at Zmq.Open (System.String host) [0x00000]
>>  at rd.MainClass.Main (System.String[] args) [0x00017] in Main.cs:39
>> Which is
>>  Zmq zmq = new Zmq();
>>  zmq.Open(""); // This!
>> I don't have libczmq.dll anywhere but it's compiled to .so file. I
>> also tried throwing it from Windows package version to my project but
>> without luck. CLR version is compiled into DLL file successfully
>> though.
>> What I'm missing?
> Try
> ./configure --with-c --with-clr
> CLR library is a wrapper over C library, so you have to build both C and CLR
> to make it work.
> Actually, I would expect the build system to fail when you try to build CLR
> without C. We'll make sure that works properly this week.

Yes, both parameters are given. If you give only --with-clr it
complains about missing --with-c.
./configure also gives summary which says that C and CLR are included.
But libczmq.dll is never generated. I looked into libczmq.so file and
it's native ELF binary.

I now also tried 0.6 Windows version with SharpDevelop and that goes a
bit further (dies on assertion error after connecting to zmq_server).
(Win XP Pro SP3).

Pekka Järvinen

More information about the zeromq-dev mailing list