Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
It surely is a nice thought.To do this I need to convert the SQLite source into a bpl. I can't 'include' the dll within the component. It's written in C++ so there a huge chalenge for me there. I know a lot about Delphi, but my knowledge about C++ is quite different. It's easy to incorporate Delphi into Borland - C++ projects but not the other way around I'm affraid. Static linking is an option here, but if you replace the dll for a new release it might prevent Delphi to stop loading if things aren't compatible. The dll must be available at design and runtime. It still requires the dll!
I don't think that the dll isues we had is causing much trouble. Of course SQLite will come out with new versions now and then, and useually you might want to follow immediately since it might contain bugfixes you need. The dll way is then by far the most easy way. This time, some default pragma's where changed so we had to investigate and correct. But it took us only a week or so.
But thanks for the thought and compliment. Enjoy the components.
I found this website only yesterday night and did not have much time to read all the information. Maybe this issue has already been solved. I don't know much of Delphi and try to develop software with CBuilder whenever possible. To avoid recompiling the sqlite functions all the time I have created a static link library (.lib). Every CBuilder project (using sqlite of course) contains a reference to this lib. As I said, I don't know much about Delphi but I assume there will be some way to add a lib to your project. If you need help creating the lib or when you're short of time, please drop me a note and I will help or send you the complete lib-file. I am very interested in this project and I will certainly use your components when they can be statically linked. For the time being I will keep an eye on this website and continue building stand-alone executables
Best regards, Hennie
:idea: on this page: link there is as link to "www.sqlite.com", you might consider changing it to "www.sqlite.org"
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
To be able to link I need obj files, I cannot link a lib directly to my knowledge. The obj's are created by a contributor of this site, and I'm not sure what he must do to get things correctly compiled to be able to use them in Delphi and C++. I suggest you try to get in contact with giavaa by private message (it is enabled on this forum). He is very busy too, so I think he'll be glad with the help he can get. I'm depending on him completely on this part since my knowledge of c++ is very basic.
When you unzip the preprocessed sources from sqlite.org link or link
and install the free c++ compiler from Borland link
then creating a lib file is easy. Just create a bat file containing these commands and run it in the same directory as the c-source files
for %%f in (*.c) do bcc32.exe -c "%%f" for %%f in (*.obj) do tlib.exe sqlite.lib +"%%f"
You can add the lib file to your project using the same dialog that's used for adding source files. In CBuilder: View Project Manager, Click on ???.exe, Right click for context menu, Choose Add, Files of type: Lib, etc. Delphi has a similar (not to say the same) interface.
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
I don't think it's that simple. If it was, you wouldn't have any problems using the statically linked components in C++. Or did you manage to use it statically? Then I misunderstood. As far as I know I can only link obj files with Delphi. This requires some changes in the sqlite source to be able to call them correctly from Delphi. Please search through the several threads about this. Delphi does know about libraries, just not the .lib albert albert
That's a disappointment. I always thought that CBuilder had a subset of the Delphi features. I've had a look at Delphi and it can only add pas- and rc-files to a project. I did not expect this.
I have managed to compile the latest SQLite version (3.2.7) to .obj format for use with Delphi.
The necessary .obj files are currently hosted at:
Simply unzip the files into your "asqlite3-1-0obj" directory and make the following minor changes to the "ASGSQLite3" unit:
Change the line
to
and add the following line below that one
You can check that the .Version property is "3.2.7".
I used the following code:
var db : TASQLite3DB; begin db := TASQLite3DB.Create(nil); try db.Database := 'e:blah.db'; db.Connected := true; ShowMessage('Version: ' + db.Version); finally FreeAndNil(db); end;
Please understand that I have only tested a small subset of the sqlite functionality so far, so I would appreciate if you can try it and post some feedback here. Bye for now, LesNes