enwi / dartzmq

A simple dart zeromq implementation/wrapper around the libzmq C++ library
https://pub.dev/documentation/dartzmq/latest/
MIT License
26 stars 17 forks source link

Failed to load dynamic library issue on MacOS platform #9

Closed richsi closed 2 years ago

richsi commented 2 years ago

Hello,

I have been trying to use dartzmq on flutter to establish a connection to a remote server host, but I keep getting the error:

[dartzmq] Failed to load library zmq: Invalid argument(s): Failed to load dynamic library 'libzmq.so': dlopen failed: library "libzmq.so" not found [dartzmq] Failed to load library libzmq: Invalid argument(s): Failed to load dynamic library 'liblibzmq.so': dlopen failed: library "liblibzmq.so" not found [dartzmq] Failed to load library libzmq-v142-mt-4_3_5: Invalid argument(s): Failed to load dynamic library 'liblibzmq-v142-mt-4_3_5.so': dlopen failed: library "liblibzmq-v142-mt-4_3_5.so" not found

I have built the MacOS platform in my local dartzmq repo and linked it to my flutter app. I was wondering if anyone could help me debug this library issue? If someone has dealt with this problem before, a simple list of steps to fix it would be much appreciated. Thanks!

enwi commented 2 years ago

Hey @richsi MacOS is currently not officially supported. In order to make it work you will have to compile ZeroMQ yourself or get a precompiled binary for MacOS and put it next to your flutter executable. Since I don't have any Apple Device I can't help you here.

enwi commented 2 years ago

Maybe you could try the linux instructions that have worked so far -> https://github.com/enwi/dartzmq/issues/8#issuecomment-1189366083