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

ArgumentError (Invalid argument(s): Failed to load dynamic library 'zmq.dll': The specified module could not be found. (error code: 126)) #34

Closed cpcgskill closed 6 months ago

cpcgskill commented 6 months ago

I encountered an error while running the example program. However, I found that the error disappeared after renaming the libzmq-v142-mt-4_3_5.dll file in the build\windows\x64\runner\Debug folder to zmq.dll. I suspect this might be a bug, indicating a possible issue with the copying or building of the zmq dll.

Additionally, I noticed that someone else had experienced a similar issue, which can be referenced here: https://github.com/enwi/dartzmq/issues/22

Link to the example program: https://pub.dev/packages/dartzmq/example

My environment is:

Windows 10 Flutter 3.19.2 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7482962148 (7 days ago) • 2024-02-27 16:51:22 -0500 Engine • revision 04817c99c9 Tools • Dart 3.3.0 • DevTools 2.31.1

enwi commented 6 months ago

Thanks for the report @cpcgskill

This error is to be expected, because the flutter code will try to load the library, which can have different names depending on the platform. I might need to change the error output to only show when none of the libraries could be loaded.

enwi commented 6 months ago

Some background info the library is loaded here: https://github.com/enwi/dartzmq/blob/77a642f077bb9390cf6e18dd03eddf5304a8b550/lib/src/bindings.dart#L203

enwi commented 6 months ago

I removed the error log on the dev branch