Page 1 of 1


Posted: Tue Jan 19, 2010 2:38 pm
by salvationofpain
Hi, i am trying to use SQLite with a simple wxWidgets project in Code::Blocks. (I can use it in a console app).

I copy sqlite3.c to my project folder and add it to the project. Then, i add the path of the folder which includes sqlite3.h to the project's compiler search directories.

While compiling, it opens wrapcctl.h and jump to line 48,

Code: Select all

48   ::SendMessage(hwnd, CCM_SETUNICODEFORMAT, wxUSE_UNICODE, 0);
A few lines of build messages can be seen below. Could anyone please help me figure out what the problem is?

* I am currently checking out wxSqlite3, but i want to solve this.

||=== sqlite2, Release ===|
||warning: ./wx_pch.h.gch/Release_wx_pch_h_gch: not for GNU C|
C:\wxMSW-2.8.10\include\wx\msw\wrapcctl.h||In function `wxSetCCUnicodeFormat':|
C:\wxMSW-2.8.10\include\wx\msw\wrapcctl.h|48|error: syntax error before ':' token|
C:\wxMSW-2.8.10\include\wx\msw\wrapcctl.h|58|error: syntax error before "wxFont"|
C:\wxMSW-2.8.10\include\wx\msw\wrapcctl.h|58|warning: type defaults to `int' in declaration of `wxFont'|
C:\wxMSW-2.8.10\include\wx\msw\wrapcctl.h|58|warning: data definition has no type or storage class|

Posted: Tue Jan 19, 2010 9:17 pm
by Mojo
I'd like to recommend to use wrapper wxSQLite3
it's difficult to link SQLite and wxWidgets without intermediate wrapper...
I use wxSQLite3 successfully.

Posted: Mon Apr 12, 2010 9:12 pm
by stahta01
Code::Blocks decides whether a file is a "C" or "C++" file based on file extension; please use .cpp for C++ files.

The errors are because the file is being compiled by the C compiler and not the C++ Compiler.

Tim S.