0

Right now I am compiling the sqlite3 code with the following options:
gcc -c -lpthread -DSQLITE_THREADSAFE=1 sqlite3.c
g++ -o test test.cc sqlite3.o -ldl -lpthread
And this works just fine.
But I saw in some projects, that the define flag -DSQLITE_THREADSAFE=1 is also in the g++ compiler call listet. Is this required or redundant?

4

1 回答 1

0

SQLITE_THREADSAFE只有在编译 SQLite 代码本身时才需要该符号。将它添加到其他编译器调用是多余的,但不会造成伤害。

于 2013-07-31T11:03:38.957 回答