Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Support

## SQLite C Interface

## Run-Time Library Version Numbers

>     SQLITE_EXTERN const char sqlite3_version[];
>     const char *sqlite3_libversion(void);
>     const char *sqlite3_sourceid(void);
>     int sqlite3_libversion_number(void);

These interfaces provide the same information as the SQLITE_VERSION, SQLITE_VERSION_NUMBER, and SQLITE_SOURCE_ID #defines in the header, but are associated with the library instead of the header file. Cautious programmers might include assert() statements in their application to verify that values returned by these interfaces match the macros in the header, and thus insure that the application is compiled with matching library and header files.

>     assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
>     assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
>     assert( strcmp(sqlite3_libversion,SQLITE_VERSION)==0 );

The sqlite3_libversion() function returns the same information as is in the sqlite3_version[] string constant. The function is provided for use in DLLs since DLL users usually do not have direct access to string constants within the DLL. Similarly, the sqlite3_sourceid() function returns the same information as is in the SQLITE_SOURCE_ID #define of the header file.

See also: sqlite_version() and sqlite_source_id().

Requirements: H10021 H10022 H10023

See also lists of Objects, Constants, and Functions.