* Fri 2004-12-31 Gerrit Haase <gp AT familiehaase.de> INBOX.list.cygwin-apps | Jari wrote: | > -# elif defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) | > +# elif defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) | | It works ok using the default interface with Cygwin, there is no need to | define OS_WIN.
Ok | > gcc -Wl,--base-file,.libs/cygsqlite-0.dll-base | > -Wl,-e,[EMAIL PROTECTED] -o .libs/cygsqlite-0.dll attach.lo | > auth.lo btree.lo build.lo copy.lo date.lo delete.lo expr.lo func.lo | > hash.lo insert.lo main.lo opcodes.lo os.lo pager.lo parse.lo | > pragma.lo printf.lo random.lo select.lo table.lo tokenize.lo | > update.lo util.lo vacuum.lo vdbe.lo vdbeaux.lo where.lo trigger.lo | > btree_rb.lo | > /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../libcygwin.a(libcmain.o)(.text+0x7c): | > undefined reference to [EMAIL PROTECTED]' | > collect2: ld returned 1 exit status | > make: *** [libsqlite.la] Error 1 | | This is because the included ltmain.sh is old. Try updating the | libtool files. I upgraded from 1.5.10 to 1.9f with setup.exe, but it still gives this error. Is there something I'm missing? I'm attaching the patch I'm using now for Makefile.in (sqlite 2.8.12). Jari
--- sqlite-2.8.12-orig/Makefile.in 2004-02-08 16:41:36.000000000 +0000 +++ sqlite-2.8.12/Makefile.in 2004-12-31 19:17:58.000000000 +0000 @@ -26,14 +26,20 @@ # will run on the target platform. (BCC and TCC are usually the # same unless your are cross-compiling.) # -TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src +# TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src +TCC = $(CC) @TARGET_CFLAGS@ -I. -I${TOP}/src -DNDEBUG + +LIBTOOL_LDFLAGS=-no-undefined # Some standard variables and programs # prefix = @prefix@ exec_prefix = @exec_prefix@ INSTALL = @INSTALL@ -LIBTOOL = ./libtool +LIBTOOL = ./libtool +LIBTOOLL = $(LIBTOOL) --mode=link +LIBTOOLC = $(LIBTOOL) --mode=compile +LIBTOOLI = $(LIBTOOL) --mode=install RELEASE = @ALLOWRELEASE@ # Compiler options needed for programs that use the TCL library. @@ -42,7 +48,8 @@ # The library that programs using TCL must link against. # -LIBTCL = @TARGET_TCL_LIBS@ +# LIBTCL = @TARGET_TCL_LIBS@ +LIBTCL = /usr/lib/libtcl8*.a # Compiler options needed for programs that use the readline() library. # @@ -178,16 +185,16 @@ | awk '{print $$5,$$6}' >last_change libsqlite.la: $(LIBOBJ) - $(LIBTOOL) $(TCC) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath $(exec_prefix)/lib \ - -version-info "8:6:8" + $(LIBTOOLL) $(TCC) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath $(exec_prefix)/lib \ + $(LIBTOOL_LDFLAGS) -version-info "8:6:8" libtclsqlite.la: tclsqlite.lo libsqlite.la - $(LIBTOOL) $(TCC) -o libtclsqlite.la tclsqlite.lo \ + $(LIBTOOLL) $(TCC) -o libtclsqlite.la tclsqlite.lo \ libsqlite.la $(LIBTCL) -rpath $(exec_prefix)/lib \ - -version-info "8:6:8" + $(LIBTOOL_LDFLAGS) -version-info "8:6:8" [EMAIL PROTECTED]@: $(TOP)/src/shell.c libsqlite.la sqlite.h - $(LIBTOOL) $(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \ + $(LIBTOOLC) $(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \ libsqlite.la $(LIBREADLINE) -rpath $(exec_prefix)/lib # This target creates a directory named "tsrc" and fills it with @@ -210,22 +217,22 @@ cp $(TOP)/tool/lempar.c . btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h - $(LIBTOOL) $(TCC) -c $(TOP)/src/btree.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/btree.c btree_rb.lo: $(TOP)/src/btree_rb.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/btree_rb.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/btree_rb.c build.lo: $(TOP)/src/build.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/build.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/build.c main.lo: $(TOP)/src/main.c $(HDR) - $(LIBTOOL) $(TCC) -c ${INCOREFLAGS} $(TOP)/src/main.c + $(LIBTOOLC) $(TCC) -c ${INCOREFLAGS} $(TOP)/src/main.c pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h - $(LIBTOOL) $(TCC) -c $(TOP)/src/pager.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/pager.c opcodes.lo: opcodes.c - $(LIBTOOL) $(TCC) -c opcodes.c + $(LIBTOOLC) $(TCC) -c opcodes.c opcodes.c: $(TOP)/src/vdbe.c echo '/* Automatically generated file. Do not edit */' >opcodes.c @@ -241,10 +248,10 @@ awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h os.lo: $(TOP)/src/os.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/os.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/os.c parse.lo: parse.c $(HDR) - $(LIBTOOL) $(TCC) -c parse.c + $(LIBTOOLC) $(TCC) -c parse.c parse.h: parse.c @@ -274,80 +281,80 @@ $(TOP)/src/sqlite.h.in >sqlite.h tokenize.lo: $(TOP)/src/tokenize.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/tokenize.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/tokenize.c util.lo: $(TOP)/src/util.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/util.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/util.c vdbe.lo: $(TOP)/src/vdbe.c $(VDBEHDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/vdbe.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/vdbe.c vdbeaux.lo: $(TOP)/src/vdbe.c $(VDBEHDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/vdbeaux.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/vdbeaux.c where.lo: $(TOP)/src/where.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/where.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/where.c copy.lo: $(TOP)/src/copy.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/copy.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/copy.c date.lo: $(TOP)/src/date.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/date.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/date.c delete.lo: $(TOP)/src/delete.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/delete.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/delete.c expr.lo: $(TOP)/src/expr.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/expr.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/expr.c func.lo: $(TOP)/src/func.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/func.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/func.c hash.lo: $(TOP)/src/hash.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/hash.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/hash.c insert.lo: $(TOP)/src/insert.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/insert.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/insert.c random.lo: $(TOP)/src/random.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/random.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/random.c select.lo: $(TOP)/src/select.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/select.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/select.c table.lo: $(TOP)/src/table.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/table.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/table.c trigger.lo: $(TOP)/src/trigger.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/trigger.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/trigger.c update.lo: $(TOP)/src/update.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/update.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/update.c vacuum.lo: $(TOP)/src/vacuum.c $(HDR) - $(LIBTOOL) $(TCC) -c $(TOP)/src/vacuum.c + $(LIBTOOLC) $(TCC) -c $(TOP)/src/vacuum.c tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c pragma.lo: $(TOP)/src/pragma.c $(HDR) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/pragma.c + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/pragma.c printf.lo: $(TOP)/src/printf.c $(HDR) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/printf.c + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/printf.c attach.lo: $(TOP)/src/attach.c $(HDR) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/attach.c + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/attach.c auth.lo: $(TOP)/src/auth.c $(HDR) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/auth.c + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/auth.c tclsqlite: $(TOP)/src/tclsqlite.c libsqlite.la - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \ + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \ $(TOP)/src/tclsqlite.c libsqlite.la $(LIBTCL) [EMAIL PROTECTED]@: $(TOP)/src/tclsqlite.c libtclsqlite.la libsqlite.la $(TESTSRC) - $(LIBTOOL) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\ + $(LIBTOOLC) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\ -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \ libtclsqlite.la libsqlite.la $(LIBTCL) @@ -450,11 +457,13 @@ mkdir -p doc mv $(DOC) doc -install: [EMAIL PROTECTED]@ libsqlite.la sqlite.h +install: [EMAIL PROTECTED]@ libsqlite.la sqlite.h tclsqlite $(INSTALL) -d $(exec_prefix)/lib - $(LIBTOOL) $(INSTALL) libsqlite.la $(exec_prefix)/lib + $(LIBTOOLI) $(INSTALL) libsqlite.la $(exec_prefix)/lib + $(LIBTOOLI) $(INSTALL) libtclsqlite.la $(exec_prefix)/lib $(INSTALL) -d $(exec_prefix)/bin - $(LIBTOOL) $(INSTALL) [EMAIL PROTECTED]@ $(exec_prefix)/bin + $(LIBTOOLI) $(INSTALL) [EMAIL PROTECTED]@ $(exec_prefix)/bin + $(LIBTOOLI) $(INSTALL) [EMAIL PROTECTED]@ $(exec_prefix)/bin $(INSTALL) -d $(prefix)/include $(INSTALL) -m 0644 sqlite.h $(prefix)/include $(INSTALL) -d $(exec_prefix)/lib/pkgconfig; @@ -476,7 +485,7 @@ sqlite.dll: $(LIBOBJ) sqlite.def dllwrap --dllname sqlite.dll --def sqlite.def $(LIBOBJ) strip sqlite.dll - + #target for dll import libraries implib: sqlite.lib diff --unified --recursive --new-file --ignore-matching-lines='[$]Author.*[$]' --ignore-matching-lines='[$]Date.*[$]' --ignore-matching-lines='[$]Header.*[$]' --ignore-matching-lines='[$]Id.*[$]' --ignore-matching-lines='[$]Locker.*[$]' --ignore-matching-lines='[$]Log.*[$]' --ignore-matching-lines='[$]Name.*[$]' --ignore-matching-lines='[$]RCSfile.*[$]' --ignore-matching-lines='[$]Revision.*[$]' --ignore-matching-lines='[$]Source.*[$]' --ignore-matching-lines='[$]State.*[$]' --exclude=.deps --exclude='*.gmo' --exclude='*.Plo' --exclude='*.Tpo' --exclude='*.Po' --exclude=config.cache --exclude=config.log --exclude='*.cache' --exclude='*.[zZ]' --exclude='*.arj' --exclude='*.bz2' --exclude='*.gz' --exclude='*.rar' --exclude='*.tar' --exclude='*.tbz' --exclude='*.tgz' --exclude='*.zip' --exclude='*.zoo' --exclude='*.o' --exclude='*.lo' --exclude='*.a' --exclude='*.la' --exclude='*.sa' --exclude='*.dll' --exclude='*.dll.a' --exclude='*.exe' --exclude='*.bin' --exclude='*.gif' --exclude='*.ico' --exclude='*.ICO' --exclude='*.jpg' --exclude='*.png' --exclude='*.pdf' --exclude='*.xpm' --exclude=.build --exclude=.inst --exclude=.sinst --exclude=debian --exclude=tmp --exclude='*.BAK' --exclude='*.bak' --exclude='*.cvsignore' --exclude='*.dvi' --exclude='*.log' --exclude='*.orig' --exclude='*.ps' --exclude='*.eps' --exclude='*.rej' --exclude='*.stackdump' --exclude='*.swp' --exclude='*.tmp' --exclude='*.TST' --exclude='*.tst' --exclude='*[~#]' --exclude='.[~#]*' --exclude='.emacs_[0-9]*' --exclude='.nfs*' --exclude='[~#]*' --exclude=a.out --exclude=core --exclude=CVS --exclude=RCS --exclude=.svn --exclude=SCCS --exclude=MT --exclude=sqlite -x sqlite3.h sqlite-2.8.12-orig/src/os.h sqlite-2.8.12/src/os.h