Hello,
I'm quite new to the Nim language, but I started to like it immediately :-) ... now, I try to find my way through all the tools / functions which I need every day and one is accessing Mysql.
Under Windows, I have the following snippet:
import db_mysql
let db = open("someserver", "user", "pwd", "database")
db.close()
echo "Done."
But executing the code fails with the error:
could not load: (libmysql.dll|libmariadb.dll)
Error: execution of an external program failed: 'd:\a-daten\nextcloud\nim\mysql.exe '
So I googled around and found some hints, I downloaded the Mysql app and unzipped it. Then, I copied the "libmysql.dll" to both the folders where my app exists and the folder of the nim executable: but still doesn't work. I also put the "lib" folder of the Mysql code into the PATH variable, but still doesn't work.
Maybe someone could help me? Please be patient I'm a beginner :-)
What you have done should work.
Do you run your program form the same folder as the dll?
Could naming your program mysql.exe have some odd effect?
I renamed the program - no effect. And yes, its definitely the 64 bit version of the DLL.
So, compiling works, I get a exe file. But when I execute it, it can't find the DLL. Are there any parameters I have to add to the compiling process? Or when I execute the app?