NO

Author Topic: Sqlite 3 with PellesC  (Read 7183 times)

kobold

  • Guest
Sqlite 3 with PellesC
« on: March 21, 2006, 08:27:43 PM »
I will explain here how to get Sqlite 3 running with your PellesC application. I had some trouble because there was no lib file delivered with the packages. But no problem, we can make one!


Download http://www.sqlite.org/sqlitedll-3_3_4.zip and unpack the stuff into a new directory.

We have to modify the def file now a little bit.
Open the sqlite def file with wordpad (not the windows editor!)
It will look like:
Code: [Select]

EXPORTS
sqlite3_aggregate_context
sqlite3_aggregate_count
...


Add "LIBRARY sqlite3" (it is important that the name is the same as the name of your sqlite dll!)

After that it looks like:

Code: [Select]

LIBRARY sqlite3
EXPORTS
sqlite3_aggregate_context
sqlite3_aggregate_count
...


Save it. You can give it a new name, so you have a copy if something goes wrong. Put it in the directory where the sqlite dll is.

Now you need a Dos console and the directory for polib.exe and the directory where you have extracted the sqlite stuff.

- Open the console, type in the path and name for polib.exe
- Add "/DEF:" + the path to the sqlite.def file (or the new name if you have renamed it)
- Add "/OUT:" + the new path and name for the lib which will be generated.

This could look like:
Quote
K:\>E:\Programme\PellesC\Bin\polib.exe /DEF:E:\Programme\PellesC\Projects\sqlite\sqlite3.txt /OUT:E:\Programme\PellesC\Projects\sqlite\sqlite3.lib


Hit enter and this is the output:
Code: [Select]
POLIB: warning: /MACHINE not specified; assuming IX86.

Except that little warning it seems to be ok and you can use now your new generated lib file and the sqlite dll in your projects.

Congratulations!

TheRaven

  • Guest
Re: Sqlite 3 with PellesC
« Reply #1 on: June 09, 2017, 05:41:04 AM »
You could simply load the sqlite3.dll at run time then get handles to the dll exports; works for me.
I generally do the dynamic run time route remembering to consult the official SQLite3 API and it (SQLite) likes Unicode now.

Good stuff regardless, nice tut/example!