Build SQLite in Code::blocks

first download a source tarball, then add all .h and .c into code::blocks. and remove tclsqlite.c file. Then copy tcl.h, tclDecls.h, and tclPlatDecls.h from /usr/include/tclXXX/ to your project forld and add them into your project. Then choose your project name in the left Projects browser. and right click, then choose build options. like following:

In the opening window, choose other option tab and add some options:

then choose #define tab:

ok, done. go back and build the project. If you have sqlite3api multiply defined error, you may don’t use SQLITE_CORE macro. If you have realine function dose not have prototype, you may don’t have “libreadline”, or you not use -lreadline and -lcurses option links. If the compiler tells you:”can not find “tcl.h” head file”, you can copy tcl.h, tclDecls.h, and tclPlatDecls.h into your project, or change tcl.h to <tcl.h>. If you have some error with tcl, you may leave the tclsqlit.c file from building. If you persist in compile tclsqlit.c, you should merge its all codes into main.c.