1.Dd January 24, 2024 2.Dt SQLITE3_VERSION 3 3.Os 4.Sh NAME 5.Nm sqlite3_version , 6.Nm sqlite3_libversion , 7.Nm sqlite3_sourceid , 8.Nm sqlite3_libversion_number 9.Nd run-Time library version numbers 10.Sh SYNOPSIS 11.In sqlite3.h 12.Vt const char sqlite3_version[]; 13.Ft const char * 14.Fo sqlite3_libversion 15.Fa "void" 16.Fc 17.Ft const char * 18.Fo sqlite3_sourceid 19.Fa "void" 20.Fc 21.Ft int 22.Fo sqlite3_libversion_number 23.Fa "void" 24.Fc 25.Sh DESCRIPTION 26These interfaces provide the same information as the SQLITE_VERSION, 27SQLITE_VERSION_NUMBER, and SQLITE_SOURCE_ID 28C preprocessor macros but are associated with the library instead of 29the header file. 30Cautious programmers might include assert() statements in their application 31to verify that values returned by these interfaces match the macros 32in the header, and thus ensure that the application is compiled with 33matching library and header files. 34.Bd -ragged 35.Bd -literal 36assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); assert( 37strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 38); 39.Ed 40.Pp 41.Ed 42.Pp 43The sqlite3_version[] string constant contains the text of SQLITE_VERSION 44macro. 45The sqlite3_libversion() function returns a pointer to the to the sqlite3_version[] 46string constant. 47The sqlite3_libversion() function is provided for use in DLLs since 48DLL users usually do not have direct access to string constants within 49the DLL. 50The sqlite3_libversion_number() function returns an integer equal to 51SQLITE_VERSION_NUMBER. 52The sqlite3_sourceid() function returns a pointer to a string constant 53whose value is the same as the SQLITE_SOURCE_ID C preprocessor 54macro. 55Except if SQLite is built using an edited copy of the amalgamation, 56then the last four characters of the hash might be different from SQLITE_SOURCE_ID. 57.Pp 58.Sh IMPLEMENTATION NOTES 59These declarations were extracted from the 60interface documentation at line 154. 61.Bd -literal 62SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; 63SQLITE_API const char *sqlite3_libversion(void); 64SQLITE_API const char *sqlite3_sourceid(void); 65SQLITE_API int sqlite3_libversion_number(void); 66.Ed 67.Sh SEE ALSO 68.Xr SQLITE_VERSION 3 69