User forums > Help

Sqlite installation into Code::Blocks

<< < (3/4) > >>

MortenMacFly:

--- Quote from: Guillaume on May 23, 2006, 10:58:08 pm ---I didn't found some files with .a or .lib, I have downloaded a lot of packages from sqlite.org, but I will search again

--- End quote ---
...this: http://www.hwaci.com/sw/sqlite/mingw.html may help.

Ceniza:
Nice to see you used the search tool :)

Sorry but I was wrong: there's no package with library, but you can do as follows:

1. Download sqlitedll-3_3_5.zip from here.
2. Decompress it in some folder.
3. Open a console and go to that folder.
4. Run this command: dlltool --def sqlite3.def --dllname sqlite3.dll --output-lib libsqlite3.a.
5. Download sqlite-source-3_3_5.zip from here.
6. Decompress it somewhere.
7. Take sqlite3.h from it and place it somewhere.
8. Add to your project the directory where to find the header and where to find the library.
9. Try again.
10. Remember to have the dll in a path pointed by the environment variable PATH or just at one side of your executable.

If you want the static library, you'd have to compile it yourself (I'd use MSYS for it).

I hope I didn't miss anything.

Ceniza:
Even better:

1. Download the file in step 5.
2. Decompress it somewhere.
3. Copy the attached project (decompress it first) to that folder.
4. Open the project file (with Code::Blocks of course).
5. Click on Build and you'll get libsqlite3.a (static library).

If you don't care too much, just move libsqlite3.a to C:\MinGW\lib (if C:\MinGW is where you have MinGW installed) and sqlite3.h to C:\MinGW\include, or just do as the steps 7 and 8 suggest.

[attachment deleted by admin]

takeshimiya:
<- Yes, building sqlite as a static library is better, because it's so tiny that it's not worth a shared library.

Guillaume:
I have followed your instructions Ceniza, and my program run !

I have made all steps before posting here, except this :
4. Run this command: dlltool --def sqlite3.def --dllname sqlite3.dll --output-lib libsqlite3.a.
So with the libsqlite3.a, it's better ;)

I will look for documentation on how to compile a static library on the web, because I'm a very newbie in C++ and I don't know nothing about this.

Thank you again for your help, everybody  :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version