Lime "could not link to neko." How can I help it?

Every time I use lime or openfl, they print a few “Could not link to neko.” errors. Nothing else to the warning, they just print that among the rest of the output, along with some text like this:

Called from lime/_internal/backend/native/NativeCFFI.hx line 609
Called from lime/system/CFFI.hx line 172
Called from lime/system/CFFI.hx line 306
Uncaught exception - Could not find NekoAPI interface.
Could not link to neko.

It does not make the program fail, and most things work correctly. The only problem is when I try to lime test neko something, lime doesn’t run the program, which is annoying for testing.

It seems clear to me that lime is unable to find neko, but it is installed on my machine, and on the path. I use macos with haxe and neko installed from homebrew, and it usually works.

My question is, how does lime look for neko and how can I force it to find it in a certain place, then? Or is the issue completely different?

Does this occur when running the lime command or only when trying to run a generated Neko project?

You may need to run haxelib run openfl setup again if you recently updated to Haxe 4 in order to install a newer “openfl” and “lime” shortcut that works for 64-bit Neko on Windows

It happens anytime I run the lime command. I have run openfl setup multiple times, which yielded no visible difference.

It happens again and again from version 7.3.0. I’ve reported about it 7 months ago. Before, it could be solved by coping lib folder’s contents from haxe/lib/lime/7,5,0/ to haxe/lib/lime/7,5,0/ndll. In current release it can be solved by coping folder ndll from haxe/lib/lime/7,7,0/ to haxe/lib/lime/7,7,0/src.

src
|_cs
|_haxe
|_lime
|_ndll

Are you talking about the haxelib folder? I looked there and there was only a ndll folder, no lib folder. Copying the former as the latter did not change anything either.

I clearly specified the folder. Maybe this way will be clearer: you should copy the whole ndll folder from {HaxeToolkit location}/haxe/lib/lime/7,7,0/ to {HaxeToolkit location}/haxe/lib/lime/7,7,0/src

Read carefully. First solution was for the outdated version before 7.6.0. Second is for 7.6.0 and higher.