rljacobson / Levenshtein

A Blazingly Fast Damerau–Levenshtein Edit Distance Function (UDF) for MySQL
MIT License
24 stars 3 forks source link

1127 - Can't find symbol 'damlev' in library [SOLVED] #8

Open sahannn opened 3 years ago

sahannn commented 3 years ago

CREATE FUNCTION damlev RETURNS INTEGER SONAME 'libdamlev.dll'

1127 - Can't find symbol 'damlev' in library Time: 0,004s

does not find any

sahannn commented 3 years ago

show variables like 'plugin_dir';

C:\Program Files\MySQL\MySQL Server 8.0\lib\plugin\

rljacobson commented 3 years ago

After building, install the shared library libdamlev.so to the plugins directory of your MySQL installation.

Does the file libdamlev.dll exist in your plugin directory?

sahannn commented 3 years ago

Yes there is in the plugin directory I tried the release Version 1.0 Beta download. I'm trying for windows.

sahannn commented 3 years ago

Yes there is in the plugin directory I tried the release Version 1.0 Beta download. I'm trying for windows.

I created and tried the new version. It didn't work either.

ebaldino commented 3 years ago

Same problem here, on two different Windows (7 & 10) machines.

sahannn commented 3 years ago

Same problem here, on two different Windows (7 & 10) machines.

  • Drop libdamlev.dll into C:\Program Files\MySQL\MySQL Server 8.0\lib\plugin
  • Issue any of the CREATE FUNCTION damlev... commands
  • Get ERROR 1127 (HY000): Can't find symbol 'damlev...' in library

do you know what is the solution?

ebaldino commented 3 years ago

Sorry, no. Will try to take a look at the code and compile it, but probably won`t have the time to do so this week...

sahannn commented 3 years ago

Sorry, no. Will try to take a look at the code and compile it, but probably won`t have the time to do so this week...

If you find a solution, please let me know

ebaldino commented 3 years ago

Hi Sahann,

Well, I got it working! The function names weren't being exported, so I had to add declspec(dllexport) and cdecl to each function declaration in the extern "C" {} groups, in each class. Then I compiled under Visual Studio, and everything worked.

Here's a copy of the dll file I'm using, Works great under MySQL 8.0! https://tinyurl.com/bepjkk6h

sahannn commented 3 years ago

Hi Sahann,

Well, I got it working! The function names weren't being exported, so I had to add declspec(dllexport) and cdecl to each function declaration in the extern "C" {} groups, in each class. Then I compiled under Visual Studio, and everything worked.

Here's a copy of the dll file I'm using, Works great under MySQL 8.0! https://tinyurl.com/bepjkk6h

Thank you, can you share the revised source code as well virtual studio

golimarrrr commented 2 years ago

The link does not work anymore. Maybe you can submit the file to the project so they replace the one in the Releases section

ebaldino commented 2 years ago

Hi. I fixed the link (https://tinyurl.com/bepjkk6h). It doesn't work (for me) if you click on it inside Github, but if you copy the link to the address line, it will download the file. I can't guarantee how long the file will be available, although it should be at least a few months. And I'm sorry, I no longer have the source code. I ended up not using this library for my application, and the source code eventually got lost. Also, here's the file, attached to this comment: libdamlev.zip .

rljacobson commented 2 years ago

It'd be awesome if you could make a pull request with your fix. Unfortunately I do not have access to that platform to do it myself.