I'm having troubling linking a program with sqlite3. Any ideas?
gcc -g -O2 main.o work.o uuid.o sqlite3.o -lboost_system -lboost_thread -o server
sqlite3.o: In function `unixDlError':
/home/matt/dev/serv/sqlite3.c:27231: undefined reference to `dlerror'
sqlite3.o: In function `unixDlSym':
/home/matt/dev/serv/sqlite3.c:27258: undefined reference to `dlsym'
sqlite3.o: In function `unixDlClose':
/home/matt/dev/serv/sqlite3.c:27262: undefined reference to `dlclose'
sqlite3.o: In function `unixDlOpen':
/home/matt/dev/serv/sqlite3.c:27217: undefined reference to `dlopen'
collect2: ld returned 1 exit status
The current version of SQLite handles multiple connections through its thread-mode options: single-thread, multi-thread, and serialized. Single-thread is the original SQLite processing mode, handling one transaction at a time, either a read or a write from one and only one connection.
Navigate to https://www.sqlite.org/download.html and download latest amalgamation source version of SQLite. Extract all the files into your project directory, or your include path, or separate path that you will add/added as include path in your project properties.
An SQLite database is highly resistant to corruption. If an application crash, or an operating-system crash, or even a power failure occurs in the middle of a transaction, the partially written transaction should be automatically rolled back the next time the database file is accessed.
16) When can you get an SQLITE_SCHEMA error? The SQLITE_SCHEMA error is returned when a prepared SQL statement is not valid and cannot be executed. Such type occurs only when using the sqlite3 prepare() and sqlite3 step() interfaces to run SQL.
Tack an -ldl on there after -lboost_thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With