setlocal
REM Set the DB2PATH variable to
your DB2 base path, e.g., c:\\ibm\\sqllib
set DB2PATH=c:\\ibm\\sqllib
gcc -c -g -mno-cygwin -I%DB2PATH%\\include %1.c -o %1.o
dllwrap -mno-cygwin -target i386-mingw32 -o %1.dll %1.o
%DB2PATH%\\lib\\db2api.lib --def c:\\bin\\standard.def
[/code:1]
这是一个例子,希望对你有用