Getting wxSqlite3 version?
Getting wxSqlite3 version?
I know you can get the underlying database version but is there anyway to get the wxSqlite3 version?
I'm trying to write the versions of all the libraries used in the build into a log when the program runs.
Love the new vacuum function btw...
I'm trying to write the versions of all the libraries used in the build into a log when the program runs.
Love the new vacuum function btw...
Last edited by ouch67 on Mon Nov 05, 2012 11:47 pm, edited 1 time in total.
Re: Getting wxSqlite3 version?
No. Currently the wxSQLite3 version number is just a comment in the source code.ouch67 wrote:I know you can get the underlying database version but is there anyway to get the wxSqlite3 version?
Adding such a method won't be a big deal, though. Any proposal how to name this method?
Regards,
Ulrich
Re: Getting wxSqlite3 version?
It doesn't matter to me, as long as it works. I would be fine with you putting it along side or inside the current sqlite3 version function.
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Getting wxSqlite3 version?
I suggest GetLibVersion() or just GetVersion()utelle wrote: Any proposal how to name this method?
Ulrich
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Getting wxSqlite3 version?
Currently there are 2 static methods implemented to retrieve information about the underlying SQLite library:evstevemd wrote:I suggest GetLibVersion() or just GetVersion()utelle wrote: Any proposal how to name this method?
Ulrich
static wxString wxSQLite2Database::GetVersion()
static wxString wxSQLite2Database::GetSourceId()
That is, GetVersion is not an option. We could use GetLibVersion, but IMHO it's not very intuitive. Maybe GetWrapperVersion would be more appropriate?
Regards,
Ulrich
Re: Getting wxSqlite3 version?
Well do we even need it to be a function? Why not follow in wxWidgets footsteps?
Maybe nothing that fancy, but even if something like the version string one was implemented it would be handy.
In fact, is there a way to get SVN to automatically output the wxSQLite3 SVN version in to a define like this? That would probably be good enough, and you wouldn't need to manually change it constantly.
Code: Select all
/* NB: this file is parsed by automatic tools so don't change its format! */
#define wxMAJOR_VERSION 2
#define wxMINOR_VERSION 9
#define wxRELEASE_NUMBER 5
#define wxSUBRELEASE_NUMBER 0
#define wxVERSION_STRING wxT("wxWidgets 2.9.5")
In fact, is there a way to get SVN to automatically output the wxSQLite3 SVN version in to a define like this? That would probably be good enough, and you wouldn't need to manually change it constantly.
Re: Getting wxSqlite3 version?
Well, you asked for a runtime method.ouch67 wrote:Well do we even need it to be a function?
This is a compile time method. Of course such a #define can be added as well.ouch67 wrote:Why not follow in wxWidgets footsteps?
Maybe nothing that fancy, but even if something like the version string one was implemented it would be handy.Code: Select all
/* NB: this file is parsed by automatic tools so don't change its format! */ #define wxMAJOR_VERSION 2 #define wxMINOR_VERSION 9 #define wxRELEASE_NUMBER 5 #define wxSUBRELEASE_NUMBER 0 #define wxVERSION_STRING wxT("wxWidgets 2.9.5")
Yes, SVN supports substituting several keyword strings in the source code.ouch67 wrote:In fact, is there a way to get SVN to automatically output the wxSQLite3 SVN version in to a define like this? That would probably be good enough, and you wouldn't need to manually change it constantly.
Regards,
Ulrich
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Getting wxSqlite3 version?
I agree!utelle wrote:
That is, GetVersion is not an option. We could use GetLibVersion, but IMHO it's not very intuitive. Maybe GetWrapperVersion would be more appropriate?
Regards,
Ulrich
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Getting wxSqlite3 version?
Well as I said earlier I don't really care what it's called or how it's implemented as long as it works and it's not a pain to maintain. So GetWrapperVersion sounds just fine to me.
Re: Getting wxSqlite3 version?
I released wxSQLite 3.0.1 which now supports wxSQLite3Database::GetWrapperVersion.ouch67 wrote:Well as I said earlier I don't really care what it's called or how it's implemented as long as it works and it's not a pain to maintain. So GetWrapperVersion sounds just fine to me.
Regards,
Ulrich
Re: Getting wxSqlite3 version?
I love wxSqlite3 and am always keep it as a must-have in wx workshop.
Glad wxSqlite3-3.0.1has been released.I have two issues:
1.I can't build the sample ,unless I replace the existing makefile.gcc (inside /build folder) with a previous one (could be in wxSqlite3-2.x) and then everything goes fine;The error message when building with the existing makefile.gcc is as attached (it is too long to paste here)
2.I can't build dbadmin this time,but pretty well before.It complained that:
But after I replaced
with
It still complained:
Thanks!
Regards,
Sam
Glad wxSqlite3-3.0.1has been released.I have two issues:
1.I can't build the sample ,unless I replace the existing makefile.gcc (inside /build folder) with a previous one (could be in wxSqlite3-2.x) and then everything goes fine;The error message when building with the existing makefile.gcc is as attached (it is too long to paste here)
2.I can't build dbadmin this time,but pretty well before.It complained that:
Code: Select all
C:\person\lovedev\sdk\wxsqlite3\dbadmin\specgrid.cpp||In member function 'virtual void wxGridCellBlobEditor::PaintBackground(const wxRect&, wxGridCellAttr*)':|
C:\person\lovedev\sdk\wxsqlite3\dbadmin\specgrid.cpp|474|error: no matching function for call to 'wxGridCellBlobEditor::PaintBackground(const wxRect&, wxGridCellAttr*&)'|
C:\person\lovedev\sdk\wx312\include\wx\generic\grid.h|216|note: candidates are: virtual void wxGridCellEditor::PaintBackground(wxDC&, const wxRect&, const wxGridCellAttr&)|
C:\person\lovedev\sdk\wxsqlite3\dbadmin\specgrid.cpp|482|error: no matching function for call to 'wxGridCellBlobEditor::PaintBackground(const wxRect&, wxGridCellAttr*&)'|
C:\person\lovedev\sdk\wx312\include\wx\generic\grid.h|216|note: candidates are: virtual void wxGridCellEditor::PaintBackground(wxDC&, const wxRect&, const wxGridCellAttr&)|
||=== Build finished: 2 errors, 0 warnings (0 minutes, 19 seconds) ===|
Code: Select all
wxGridCellEditor::PaintBackground(rectCell, attr);
Code: Select all
wxGridCellEditor::PaintBackground(dc,rectCell, attr);
Code: Select all
C:\person\lovedev\sdk\wx312\include\wx\generic\grid.h||In member function 'virtual void wxGridCellBlobEditor::PaintBackground(const wxRect&, wxGridCellAttr*)':|
C:\person\lovedev\sdk\wx312\include\wx\generic\grid.h|491|error: 'virtual wxGridCellAttr::~wxGridCellAttr()' is protected|
C:\person\lovedev\sdk\wxsqlite3\dbadmin\specgrid.cpp|476|error: within this context|
C:\person\lovedev\sdk\wx312\include\wx\generic\grid.h|491|error: 'virtual wxGridCellAttr::~wxGridCellAttr()' is protected|
C:\person\lovedev\sdk\wxsqlite3\dbadmin\specgrid.cpp|485|error: within this context|
||=== Build finished: 4 errors, 0 warnings (0 minutes, 2 seconds) ===|
Regards,
Sam
- Attachments
-
- errlog.txt
- (62.84 KiB) Downloaded 204 times
Regards,
Sam
-------------------------------------------------------------------
Windows 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
Sam
-------------------------------------------------------------------
Windows 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
Re: Getting wxSqlite3 version?
Thanks. Positive feedback always encourages me.samsam598 wrote:I love wxSqlite3 and am always keep it as a must-have in wx workshop.
I'll take a look at the make log file. I have to admit that I myself use M$ Visual C++ under Windows and gcc/configure under Linux. I rely on bakefile to generate usable build files for all other configurations. In both environments I use for development I didn't experience problems.samsam598 wrote:Glad wxSqlite3-3.0.1has been released.I have two issues:
1.I can't build the sample ,unless I replace the existing makefile.gcc (inside /build folder) with a previous one (could be in wxSqlite3-2.x) and then everything goes fine;The error message when building with the existing makefile.gcc is as attached (it is too long to paste here)
I removed build support for dbadmin on purpose since I don't have the capacity to keep this application up-to-date. The application wasn't developed by me and it is unfortunately not actively maintained by its original developer. The code certainly needs several adjustments to make it compilable and executable with the current wxWidgets version. Sorry, regarding dbadmin you are on your own.samsam598 wrote:2.I can't build dbadmin this time,but pretty well before.It complained that: [...]
Regards,
Ulrich
Re: Getting wxSqlite3 version?
In the meantime I inspected your make log file.samsam598 wrote:I have two issues:
1.I can't build the sample ,unless I replace the existing makefile.gcc (inside /build folder) with a previous one (could be in wxSqlite3-2.x) and then everything goes fine;The error message when building with the existing makefile.gcc is as attached (it is too long to paste here)
1) The compiler warnings can be safely ignored. Nevertheless for the next release I will modify the source code to eliminate the warnings in wxsqlite3.cpp.
2) The minimal sample itself references directly only code from the wxWidgets base library. It seems that GUI code is indirectly referenced somehow. Comparing the gcc make files of wxSQLite3 2.1.3 with the current ones I don't see a difference which could explain why the old ones should work and the new ones not. I see 2 ways which could possibly fix the problem:
a) use CXXFLAGS=-DwxUSE_GUI=0 when invoking make
b) add the wxWidgets core library to the list of link libraries
Regards,
Ulrich