So I run into the following error when trying to run a basic test program that links to an external library (uWS - https://github.com/uWebSockets/uWebSockets):
dyld: lazy symbol binding failed: Symbol not found: _uv_loop_new
Referenced from: /usr/local/lib/libuWS.dylib
Expected in: flat namespace
dyld: Symbol not found: _uv_loop_new
Referenced from: /usr/local/lib/libuWS.dylib
Expected in: flat namespace
I've found a bunch of other questions and answers related to very similar issues, but they just talk about the library being referenced (in this case libuWS.dylib
) not being able to find it's dependencies. I've checked it's dependencies with otool -L libuWS.dylib
and they all exist where they should.
I noticed that all the other examples of the error had "expected in" as the library that was missing, which makes sense. I'm just not too sure what flat namespace
means, and how I can make sure the symbol is found in it?
The project is build with CLion using the compiler installed with Xcode (I didn't change any settings here, so I guess whatever is the default.. pretty new to coding on macOS, sorry!)
Any pointer in the right direction would be greatly appreciated. Please let me know if I haven't provided enough information.