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

win32 extensions #16

Closed
jgranduel opened this issue May 14, 2021 · 3 comments
Closed

win32 extensions #16

jgranduel opened this issue May 14, 2021 · 3 comments

Comments

@jgranduel
Copy link

Hi,

thanks for this GREAT initiative!
I haven't been able to load Windows dll extension in SQLite3 shell. I installed sqlite-tools-win32-x86-<version>.zip for having the console.

sqlite> .load ./math
Error: %1 is not a valid Win32 application

I tried to compile with gcc and cl on my own side without success (I'm not proficient in C and less on Windows C toolchain)

> C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars32.bat
> cl.exe sqlite3-math.c -link -dll "-out:sqlite3-math.dll"
sqlite3> .load ./sqlite3-math
Error: %1 is not a valid win32 application

Same result with gcc (gcc.exe -s -O3 -m32 -c -g -shared ./sqlite3-math.c -o ./sqlite3-math.dll). Compiles but cannot load.
Any help on my mistake?

@nalgeon
Copy link
Owner

nalgeon commented May 14, 2021

Hi there! Thanks for trying sqlean! Binaries are 64-bit and require a 64-bit SQLite version. If you are using SQLite shell on Windows (sqlite.exe), its 64-bit version is available at https://github.com/nalgeon/sqlite. The 32-bit shell (downloaded from https://sqlite.org/download.html) won't do.

@jgranduel
Copy link
Author

Thank you very much.
I cann't believe I hadn't seen the paragraph in the README "Binaries are 64-bit and require a 64-bit SQLite version. If you are using SQLite shell on Windows (sqlite.exe), its 64-bit version is available at https://github.com/nalgeon/sqlite."!
I don't know why the 64-bit version is not available on SQLite site for the shell by the way.

Hope other extensions can be hosted over here !👍

@nalgeon
Copy link
Owner

nalgeon commented May 14, 2021

Glad that you've sorted that out!

I don't know why the 64-bit version is not available on SQLite site for the shell by the way.

This remains a mystery to me either ツ

Let me know if there is a specific extension you need — I'll gladly take a look.

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

No branches or pull requests

2 participants