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

Add compilation how-to to README #3

Open
nahuakang opened this issue Oct 23, 2024 · 0 comments
Open

Add compilation how-to to README #3

nahuakang opened this issue Oct 23, 2024 · 0 comments

Comments

@nahuakang
Copy link

Thanks for writing this binding.

As someone unfamiliar with C and system programming, I had a bit of trouble to get started with using your binding. Would you consider adding some how-to to the README file, something like below? That might hopefully help other newcomers like me to get started faster.

Compile on Unix-like

  1. Navigate to https://www.sqlite.org/download.html and download latest amalgamation source version of SQLite.
  2. Unzip it in your desired location.
  3. In the terminal, run the following commands to compile the static library:
gcc -c sqlite3.c
ar cr sqlite3.a sqlite3.o
  1. Move the sqlite3.a static library file to odin-sqlite folder.

Compile on Windows

I assume that you already created C++ Win32 project where you want to include SQLite.

  1. Navigate to https://www.sqlite.org/download.html and download latest amalgamation source version of SQLite.
  2. Unzip it in your desired location.
  3. Run Developer Command Prompt for VS **** to open up a powershell command prompt.
  4. Navigate with command prompt to that directory where we extracted our SQLite and run the following:
cl /c /EHsc sqlite3.c
lib sqlite3.obj
  1. Move the sqlite3.lib static library file to odin-sqlite folder.
  2. On Windows, modify the line in the sqlite3.odin file to:
when ODIN_OS ==  .Windows do foreign import sqlite "sqlite3.lib"
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

1 participant