Danny, thank you for your answer!! =)
Roger. ----- Original Message ----- From: "Danny Reinhold" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, December 30, 2003 1:15 PM Subject: Re: [sqlite] Compiling a shared library (.so) WITH threadsafe option enabled > Hi! > > > I added these things myself to the Makefile... > > > > TCC = gcc -g -O2 -DTHREADSAFE=1 -DNDEBUG=1 ........ > > LIBREADLINE = ....... -lpthread > > > > Then: > > > > $ make > > $ cd .libs > > $ strip libsqlite.so.0.8.6 > > > > That's all. Now the libsqlite.so file is only 260K (less than half the > last > > size)... > > > > May I ask?? > > > > - Is the threadsafe really enabled by changing only those two lines in > > the Makefile? > Yes, -DTHREADSAFE=1 enables thread safety > > > - Isn't the libsqlite.so too small? Haven't I stripped too much from > > it?? > Probably you compiled with debug enabled the first time. So the compiler > put a lot of debugging symbols into the output files. > With -DNDEBUG=1 you disabled the debugging mode - now the compiler > doesn't generate the debugging symbols. Thus the resulting files are much > smaller. > > You can verify this: > - Compile without -DNDEBUG=1. The resulting library should have the > old length > - Now remove the debugging symbols by using the strip command > (strip libsqlite.so) > - Now the library should have about 260K again... > > The strip command removes debugging symbols from object files, > executables and libraries while -DNDEBUG=1 causes the compiler > to not generate them (and so it's useless to strip the library after > creation)... > > - Danny > > -- > Danny Reinhold > Reinhold Software & Services > http://www.rsas.de > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]