wxSqlite3 and wxWidgets 2.9.0 Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

wxSqlite3 and wxWidgets 2.9.0

Post by jfouche »

Hi

I'm trying to port my app to 2.9. As I use wxSqlite3 (1.9.6), I tried to compile it. But I encounter the following errors :

Code: Select all

C:/_Perso/projets/projectmgr/branches/wx2.9/sdk/wxsqlite3/src/wxsqlite3.cpp:97: error: cannot convert 'const char*' to 'const wxChar*' in initialization
...
As it is supposed to compile vs 29 (as written on wxCode web site), I suppose I'm missing something...

[edit]: some informations are missing...
I'm using MinGW 4.4.0
I compiled wxWidgets that way, to create static libs :

Code: Select all

mingw32-make -f makefile.gcc BUILD=release
I compiled wxSqlite3 that way :

Code: Select all

mingw32-make -f makefile.gcc BUILD=release WX_VER=29 WX_DEBUG=0
Last edited by jfouche on Fri Nov 20, 2009 10:18 pm, edited 1 time in total.
Jérémie
utelle
Moderator
Moderator
Posts: 1127
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSqlite3 and wxWidgets 2.9.0

Post by utelle »

jfouche wrote:I'm trying to port my app to 2.9. As I use wxSqlite3 (1.9.6), I tried to compile it. But I encounter the following errors :

Code: Select all

C:/_Perso/projets/projectmgr/branches/wx2.9/sdk/wxsqlite3/src/wxsqlite3.cpp:97: error: cannot convert 'const char*' to 'const wxChar*' in initialization
...
As it is supposed to compile vs 29 (as written on wxCode web site), I suppose I'm missing something...
The wxSQLite3 1.9.6 file release is not compatible with wxWidgets 2.9. Please upgrade to wxSQLite3 1.9.7.

Edit: Unfortunately the file releases do not contain the changes necessary for wxWidgets 2.9.0 compatibility. Please download the wxsqlite3.cpp source file from the wxCode SVN.

Regards,

Ulrich
Last edited by utelle on Fri Nov 20, 2009 10:47 pm, edited 1 time in total.
jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

Post by jfouche »

Hi Ulrich

Sorry about missing compiler and build informations, I edited my previous post while your were answering. :oops:

I tried 1.9.7, with the same result :

Code: Select all

C:\Temp\wxsqlite3-1.9.7\build>mingw32-make -f makefile.gcc BUILD=release WX_VER=29 WX_DEBUG=0
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswu\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H  -D_UNICODE  -D__WXMSW__ -IC:\_Perso\projets\lib\wxWidgets-2.9.0\lib\gcc_lib\mswu -IC:\_Perso\projets\lib\wxWidgets-2.9.0\include -O2  -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include   -MTgccmswu\wxsqlite3_lib_wxsqlite3.o -MFgccmswu\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp:97: erreur: cannot convert 'const char*' to 'const wxChar*' in initialization
../src/wxsqlite3.cpp:98: erreur: cannot convert 'const char*' to 'const wxChar*' in initialization
...
Jérémie
utelle
Moderator
Moderator
Posts: 1127
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle »

jfouche wrote:Hi Ulrich

I tried 1.9.7, with the same result :

Code: Select all

C:\Temp\wxsqlite3-1.9.7\build>mingw32-make -f makefile.gcc BUILD=release WX_VER=29 WX_DEBUG=0
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswu\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H  -D_UNICODE  -D__WXMSW__ -IC:\_Perso\projets\lib\wxWidgets-2.9.0\lib\gcc_lib\mswu -IC:\_Perso\projets\lib\wxWidgets-2.9.0\include -O2  -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include   -MTgccmswu\wxsqlite3_lib_wxsqlite3.o -MFgccmswu\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp:97: erreur: cannot convert 'const char*' to 'const wxChar*' in initialization
../src/wxsqlite3.cpp:98: erreur: cannot convert 'const char*' to 'const wxChar*' in initialization
...
You are right. Unfortunately. I forgot to commit to wxCode SVN the changes necessary for 2.9 compatibility. And so they didn't made it into the wxSQLite3 1.9.7 file release either. I'm sorry for any inconveniences.

I committed the changes to wxCode SVN. Please download from there.

Regards,

Ulrich
jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

Post by jfouche »

Well, it's a little bit different ;)

Code: Select all

>mingw32-make -f makefile.gcc BUILD=release WX_VER=29 WX_DEBUG=0
if not exist gccmswu mkdir gccmswu
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswu\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H  -D_UNICODE  -D__WXMSW__ -IC:\_Perso\projets\lib\wxWidgets-2.9.0\lib\gcc_lib\mswu -IC:\_Perso\projets\lib\wxWidgets-2.9.0\include -O2  -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include   -MTgccmswu\wxsqlite3_lib_wxsqlite3.o -MFgccmswu\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp: In member function 'wxSQLite3Database& wxSQLite3Database::operator=(const wxSQLite3Database&)':
../src/wxsqlite3.cpp:2035: erreur: 'wxERRMSG_DBASSIGN_FAILED' was not declared in this scope
mingw32-make: *** [gccmswu\wxsqlite3_lib_wxsqlite3.o] Error 1
but I fixed it by adding the missing translation for 2.9.

Moreover, the generated lib keeps the 2.8.x name : libwxcode_msw28u_wxsqlite3.a and the sample doesn't compile (for this reason I think). I'll check the makefile tomorow, I'm going to bed...

Thanks
Jérémie
utelle
Moderator
Moderator
Posts: 1127
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle »

jfouche wrote:Well, it's a little bit different ;)
... but almost ... *arrgggh* ... next try (to be found in SVN).
jfouche wrote:

Code: Select all

>mingw32-make -f makefile.gcc BUILD=release WX_VER=29 WX_DEBUG=0
if not exist gccmswu mkdir gccmswu
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswu\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H  -D_UNICODE  -D__WXMSW__ -IC:\_Perso\projets\lib\wxWidgets-2.9.0\lib\gcc_lib\mswu -IC:\_Perso\projets\lib\wxWidgets-2.9.0\include -O2  -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include   -MTgccmswu\wxsqlite3_lib_wxsqlite3.o -MFgccmswu\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp: In member function 'wxSQLite3Database& wxSQLite3Database::operator=(const wxSQLite3Database&)':
../src/wxsqlite3.cpp:2035: erreur: 'wxERRMSG_DBASSIGN_FAILED' was not declared in this scope
mingw32-make: *** [gccmswu\wxsqlite3_lib_wxsqlite3.o] Error 1
but I fixed it by adding the missing translation for 2.9.

Moreover, the generated lib keeps the 2.8.x name : libwxcode_msw28u_wxsqlite3.a and the sample doesn't compile (for this reason I think). I'll check the makefile tomorow,
You have to set WX_VERSION=29 (instead of WX_VER) then the lib naming should be ok. The sample should compile without problems.

Regards,

Ulrich
Post Reply