Hi I seem to have resolved the problem below linking to the static library by removing the STRIP command for the static library from the makefile.
The problem I now have is that the library is 1.1 MB which is approximately twice the size of what the library was before. This is an embedded application so space is at a premium. Can anyone offer a suggestion to reduce the size of the static library without implementing the STRIP which seems to prevent me from statically linking? My current configure is: './configure --disable-tcl disable-shared --enable-static --exec-prefix=/sqlitestuff/sqlitegcc' Thanks Subject: [sqlite] Static library cross-compile Hi I have cross-compiled the sqlite library for use on Linux running on MIPS by basically doing the following (which I gleaned from the documentation and other posts on this mailing list): 1) Running 'configure' for the host. 2) Running 'make target_source' to create the sub-directory 'tsrc'. 3) Removing 'shell.c', 'tclsqlite.c', 'icu.c' and 'fts*'. 4) Compiling using the following makefile: AR=/opt/hardhat/devkit/mips/fp_le/bin/mips_fp_le-ar GCC=/opt/hardhat/devkit/mips/fp_le/bin/mips_fp_le-gcc STRIP=/opt/hardhat/devkit/mips/fp_le/bin/mips_fp_le-strip all: for i in *.c; do $(GCC) -c $$i; done $(AR) r libsqlite3.a *.o $(STRIP) libsqlite3.a --strip-all $(GCC) -o libsqlite3.so -shared -static *.c $(STRIP) libsqlite3.so --strip-all # end of file This appears to run fine and creates a static and shared library. However the problem I have is that if I run the makefile for my own application I get 'undefined reference' errors if I link to the static library e.g 'undefined reference to sqlite3_open'. If I link to the shared library then my makefile runs without errors and my application uses sqlite as intended. I am new to Linux so forgive me if there's something obvious I am missing. I know that the 'for' loop in the makefile above has an extra '$' compared to the examples I have seen but this seemed to be the only way to get it to reference the source files correctly. Can anyone offer any suggestions as I would like to use the static library? Thanks Chris __________ NOD32 2410 (20070720) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------