Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems installing LuaSQL #157

Open
LuisCoves opened this issue Jan 18, 2024 · 5 comments
Open

Problems installing LuaSQL #157

LuisCoves opened this issue Jan 18, 2024 · 5 comments

Comments

@LuisCoves
Copy link

I downloaded other rocks using LuaRocks but it looks like downloading LuaSQL using LuaRocks is impossible.
I've tried downloading it for MYSQL both from my computer and online but both gave me the same problem, I also tried for Postgres but have the same issue does anybody have any clue how to fix? Thx. :'(

1
2
3

@tomasguisasola
Copy link
Contributor

It seems the compiler found out how to compile LuaSQL code (all lines compiling object code (.o files) seem to have succeeded), but could not link it against the database library (the line with -o option and the name of the final .dll driver). Check whether the path (-L) correctly points to the correct path AND whether the name of the database library (-l) name it correctly.

@LuisCoves
Copy link
Author

It seems the compiler found out how to compile LuaSQL code (all lines compiling object code (.o files) seem to have succeeded), but could not link it against the database library (the line with -o option and the name of the final .dll driver). Check whether the path (-L) correctly points to the correct path AND whether the name of the database library (-l) name it correctly.

Thanks for your answer! I've checked does this paths look correct?, are all files correctly named?
Capture1
Capture2

@tomasguisasola
Copy link
Contributor

My Windows knowledge is very limited, so I have to say that I am not sure I can help you. You'd better check with someone more experienced with Windows.

Anyways, what seems strange to me is that only one library is mentioned in each invocation you tried (-llibmysql or -lmysqlclient) but there are two libraries at this directory. Can you try adding both of them? What I mean is manually execute one of the last lines showed at your tests, but adding -lmysqlclient -llibmysql (yes, double 'l'). Could you ?

@LuisCoves
Copy link
Author

I've tried this simple line and it looks like it can find one of the libraries but not the second one (libmysql), but both of the libraries can be found on the directory any ideas why?
Capture4

@tomasguisasola
Copy link
Contributor

Note that the message states that "-llibmysql" is missing, not "libmysql". It seems the compiler is considering "-llibmysql" as the name of a file to compile. I think your command line is missing something. Please try (I hope I have not mistyped anything!):

mingw32-gcc -shared -o luasql\mysql.dll src\luasql.o src\ls_mysql.o -LC:\Program Files\MySQL\MySQL Server 5.7\lib -llibmysql -lmysqlclient C:\luarocks-3.9.2-win32\win32\lua5.1\bin\lua5.1.lib -lMSVCR80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants