Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite3 linking problems

Tags:

sqlite

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
like image 979
hookenz Avatar asked Aug 11 '10 04:08

hookenz


People also ask

Can SQLite handle multiple connections?

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.

How do I connect to a SQLite library?

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.

How robust is SQLite?

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.

When can you get an SQLite schema error?

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.


1 Answers

Tack an -ldl on there after -lboost_thread.

like image 85
zwol Avatar answered Sep 20 '22 12:09

zwol