编译sqlite for windows on ubuntu dapper

参考其中的SQLITE部分: http://mpa.itc.it/radim/wingrass/INSTALL

下载源码,解压缩:

cd sqlite-3.3.5
nano Makefile.linux-gcc
#modify:
#TOP = ../sqlite-3.3.5
#这个修改不知道有没有意义

# Note: SQLite is using for example its own parser (lemon) which must be compiled first for Linux

make -f Makefile.linux-gcc lemon keywordhash.h

cp Makefile.linux-gcc Makefile.mingw-gcc

nano Makefile.mingw-gcc
# modify Makefile.mingw-gcc (BCC,TCC,AR,RANLIB):
# 修改一下相关部分:
# BCC = i586-mingw32msvc-gcc -g -O2
# TCC = i586-mingw32msvc-gcc -O6
# AR = i586-mingw32msvc-ar cr
# RANLIB = i586-mingw32msvc-ranlib

# delete tclsqlite.o from LIBOBJ in main.mk

make -f Makefile.mingw-gcc libsqlite3.a

i586-mingw32msvc-g++ –shared -o sqlite3.dll \
-Wl,–out-implib=libsqlite3.dll.a \
-Wl,–export-all-symbols \
-Wl,–enable-auto-import \
-Wl,–whole-archive libsqlite3.a \
-Wl,–no-whole-archive -lmingw32

i586-mingw32msvc-strip sqlite3.dll
cp sqlite3.dll /usr/i586-mingw32msvc/bin/
cp libsqlite3.dll.a /usr/i586-mingw32msvc/lib
cp sqlite3.h /usr/i586-mingw32msvc/include


已发布

分类

,

来自

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注